AprilNEA/OpenLogi · error
fixture structure verification failed
Error message
fixture structure verification failed: {asset} must be a non-symlink directory What it means
`require_directory` checks that a required fixture asset path exists as a real directory (via `symlink_metadata`, so a symlink to a directory still fails). Fixtures must be plain directories — symlinks are rejected so the verified corpus is exactly what ships and cannot point outside the tree.
Solutions
- Replace the symlink with a real directory containing the fixture content (copy the target's contents in).
- If the path should be a file, fix the layout so fixtures live in genuine directories.
- Re-create the fixture via the authoring tooling instead of linking to an external location.
- Re-run `openlogi fixture verify`.
Example fix
# before: fixtures/bolt -> ~/my-fixtures/bolt (symlink) # after rm fixtures/bolt cp -r ~/my-fixtures/bolt fixtures/bolt
Defensive patterns
Strategy: validation
Validate before calling
let md = std::fs::symlink_metadata(path)?;
assert!(md.is_dir() && !md.file_type().is_symlink(), "fixture must be a real directory: {}", path.display()); Prevention
- Never symlink fixture directories into the corpus; copy content instead
- Check `ls -la` in the fixtures root after copying or sharing fixtures
- Document that the verified corpus must be self-contained
When it happens
Trigger: `inspect` calls `require_directory` on a fixture path that is a symlink, or a regular file, or otherwise not a plain directory.
Common situations: A developer symlinked a fixture directory into the corpus from elsewhere (dotfiles-style setup, shared fixtures); the path was accidentally replaced by a file; an incomplete copy left the wrong entry type.
Related errors
- fixture structure verification failed
- must be a non-symlink directory
- must be a non-symlink regular file
- output must not be a symlink
- fixture structure verification failed: fixture paths must…
AI-assisted analysis of AprilNEA/OpenLogi@e846e6f4b4 (2026-09-13).
Data as JSON: /api/errors/92eb2134049e8933.
Report an issue: GitHub.
Appendix: source
Thrown at crates/openlogi-cli/src/cmd/fixture/verify.rs:222
"fixture structure verification failed: could not read {asset} {}",
directory.display()
)
})?
.collect::<std::io::Result<Vec<_>>>()
.with_context(|| format!("fixture structure verification failed while reading {asset}"))?;
entries.sort_by_key(DirEntry::file_name);
Ok(entries)
}
fn require_directory(path: &Path, asset: &str) -> Result<()> {
let metadata = fs::symlink_metadata(path).with_context(|| {
format!(
"fixture structure verification failed: could not inspect {asset} {}",
path.display()
)
})?;
if metadata.file_type().is_symlink() || !metadata.is_dir() {
bail!("fixture structure verification failed: {asset} must be a non-symlink directory");
}
Ok(())
}
fn require_entry_directory(entry: &DirEntry, asset: &str) -> Result<()> {
let metadata = entry_metadata(entry, asset)?;
if metadata.file_type().is_symlink() || !metadata.is_dir() {
bail!("fixture structure verification failed: {asset} must be a non-symlink directory");
}
Ok(())
}
fn require_regular_file(entry: &DirEntry, asset: &str) -> Result<()> {
let metadata = entry_metadata(entry, asset)?;
if metadata.file_type().is_symlink() || !metadata.is_file() {
bail!("fixture structure verification failed: {asset} must be a non-symlink regular file");
}
Ok(())View on GitHub (pinned to e846e6f4b4)