{"record":{"id":"169a3a2343b3c309","repo":"abhigyanpatwari/GitNexus","slug":"candidate-overlay-contains-no-files-overlay","errorCode":null,"errorMessage":"candidate overlay contains no files: {overlay}","messagePattern":"candidate overlay contains no files: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"eval/workflow_bench/evolution.py","lineNumber":315,"sourceCode":"                path = Path(item.path)\n                relative = path.relative_to(overlay)\n                if len(relative.as_posix().encode()) > MAX_CANDIDATE_PATH_BYTES:\n                    raise ValueError(f\"candidate overlay path exceeds {MAX_CANDIDATE_PATH_BYTES} bytes: {relative}\")\n                if item.is_symlink():\n                    raise ValueError(f\"candidate overlay cannot contain symlinks: {relative}\")\n                if item.is_dir(follow_symlinks=False):\n                    child_directories.append(path)\n                    continue\n                if not item.is_file(follow_symlinks=False):\n                    raise ValueError(f\"candidate overlay entries must be regular files: {relative}\")\n                entries.append(path)\n                if len(entries) > MAX_CANDIDATE_FILES:\n                    raise ValueError(f\"candidate overlay exceeds the {MAX_CANDIDATE_FILES}-file limit\")\n        pending.extend(child_directories)\n\n    entries.sort(key=lambda path: path.relative_to(overlay).as_posix())\n    if not entries:\n        raise ValueError(f\"candidate overlay contains no files: {overlay}\")\n\n    for path in entries:\n        relative = path.relative_to(overlay)\n        parts = relative.parts\n        if (\n            len(parts) < 4\n            or parts[:2] != (\".claude\", \"skills\")\n            or parts[2] not in CANDIDATE_SKILLS\n            or path.suffix.lower() != \".md\"\n        ):\n            raise ValueError(\n                \"candidate overlays may only contain Markdown files under \"\n                \".claude/skills/gitnexus-{plan,work}: \"\n                f\"{relative}\"\n            )\n    return entries\n\n","sourceCodeStart":297,"sourceCodeEnd":333,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/d540b00184d71a896261ee02670da9a92d59d8f7/eval/workflow_bench/evolution.py#L297-L333","documentation":"Thrown by candidate_overlay_files (evolution.py:315) when, after walking the whole tree, the collected entries list is empty. The overlay exists and is a real non-symlink directory but contains no regular files (it may contain only empty subdirectories).","triggerScenarios":"The overlay directory was created but no skill .md files were placed in it; only empty subdirectories exist; all candidate files were accidentally deleted before the run.","commonSituations":"An earlier pipeline step that was supposed to generate the prompts produced nothing; a copy command targeted the wrong source; the overlay is a placeholder created by mkdir without content.","solutions":["Add the intended .claude/skills/gitnexus-{plan,work}/*.md files to the overlay.","Regenerate the overlay artifact and confirm it is non-empty.","Check the upstream step that produces the overlay actually wrote files."],"exampleFix":"# before: empty overlay directory\nmkdir -p overlay && apply_candidate_overlay(Path('overlay'), ...)  # no files\n\n# after: ensure at least one skill file exists\nfrom pathlib import Path\nassert any(Path('overlay').rglob('*.md')), 'overlay has no skill files'","handlingStrategy":"validation","validationCode":"from pathlib import Path\n\ndef overlay_has_files(root: Path) -> bool:\n    return any(p.is_file() for p in Path(root).rglob('*'))","typeGuard":"null","tryCatchPattern":"try:\n    apply_candidate_overlay(overlay, worktree, sandbox=sandbox)\nexcept ValueError as exc:\n    if 'contains no files' in str(exc):\n        # add the skill .md files, then retry\n        ...","preventionTips":["Assert the overlay contains at least one .md before running.","Verify the upstream step that generates prompts actually wrote files.","Check rglob results rather than assuming the copy succeeded."],"tags":["overlay","config","empty-state"],"backgroundTag":null,"analyzedSha":"d540b00184d71a896261ee02670da9a92d59d8f7","analyzedAt":"2026-08-12T19:50:25.132Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}