{"record":{"id":"f1c1fc68319754e2","repo":"JuliusBrussee/caveman","slug":"invalid-fixture-path-q","errorCode":null,"errorMessage":"invalid fixture path %q","messagePattern":"invalid fixture path %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"engine/evals/harness.go","lineNumber":132,"sourceCode":"func RunDir(root string) (Report, error) {\n\tresolvedRoot, err := filepath.EvalSymlinks(root)\n\tif err != nil {\n\t\treturn Report{}, fmt.Errorf(\"resolve fixture directory: %w\", err)\n\t}\n\tmanifestRaw, err := os.ReadFile(filepath.Join(resolvedRoot, \"manifest.yaml\"))\n\tif err != nil {\n\t\treturn Report{}, fmt.Errorf(\"read manifest: %w\", err)\n\t}\n\tvar m Manifest\n\tif err := yaml.Unmarshal(manifestRaw, &m); err != nil {\n\t\treturn Report{}, fmt.Errorf(\"parse manifest: %w\", err)\n\t}\n\tif len(m.Fixtures) == 0 {\n\t\treturn Report{}, fmt.Errorf(\"manifest has no fixtures\")\n\t}\n\tread := func(name string) ([]byte, error) {\n\t\tif !fs.ValidPath(name) || name == \".\" {\n\t\t\treturn nil, fmt.Errorf(\"invalid fixture path %q\", name)\n\t\t}\n\t\tcandidate, err := filepath.EvalSymlinks(filepath.Join(resolvedRoot, filepath.FromSlash(name)))\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\trel, err := filepath.Rel(resolvedRoot, candidate)\n\t\tif err != nil || rel == \"..\" || strings.HasPrefix(rel, \"..\"+string(filepath.Separator)) {\n\t\t\treturn nil, fmt.Errorf(\"fixture path escapes root: %q\", name)\n\t\t}\n\t\treturn os.ReadFile(candidate)\n\t}\n\treturn RunManifest(m, read)\n}\n\n// RunWithQuality replays the embedded fixture set and also sends baseline and\n// compressed prompts through a model runner before grading the answers.\nfunc RunWithQuality(ctx context.Context, opts QualityOptions) (Report, error) {\n\tm, err := EmbeddedManifest()","sourceCodeStart":114,"sourceCodeEnd":150,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/766dce6b1394ebb56a3090748d5a0240a5aefb36/engine/evals/harness.go#L114-L150","documentation":"Raised by the fixture reader closure in RunDir: a manifest-referenced file name fails fs.ValidPath or is '.', i.e. it is not a valid slash-separated relative path. The manifest is pointing at a malformed file reference rather than a real escape.","triggerScenarios":"Thrown at engine/evals/harness.go:132 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use clean, slash-separated relative paths in manifest file entries","Remove leading '/', '..' segments, or '.' from the file name","Reference files directly under root or in named subdirectories"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"766dce6b1394ebb56a3090748d5a0240a5aefb36","analyzedAt":"2026-08-18T03:14:35.516Z","contentChangedAt":"2026-08-18T03:14:35.516Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}