{"record":{"id":"f4a9e2d9d2518794","repo":"abhigyanpatwari/GitNexus","slug":"candidate-overlay-entries-must-be-regular-files","errorCode":null,"errorMessage":"candidate overlay entries must be regular files: {relative}","messagePattern":"candidate overlay entries must be regular files: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"eval/workflow_bench/evolution.py","lineNumber":307,"sourceCode":"            iterator = os.scandir(directory)\n        except OSError as exc:\n            raise ValueError(f\"candidate overlay directory is unreadable: {directory}: {exc}\") from exc\n        with iterator:\n            for item in iterator:\n                entry_count += 1\n                if entry_count > MAX_CANDIDATE_ENTRIES:\n                    raise ValueError(f\"candidate overlay exceeds the {MAX_CANDIDATE_ENTRIES}-entry limit\")\n                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        ):","sourceCodeStart":289,"sourceCodeEnd":325,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/d540b00184d71a896261ee02670da9a92d59d8f7/eval/workflow_bench/evolution.py#L289-L325","documentation":"Thrown by candidate_overlay_files (evolution.py:307) for an entry that is neither a symlink, nor a directory, nor a regular file — i.e. a special file such as a FIFO, device node, or Unix socket. The overlay may contain only regular files (and directories to hold them).","triggerScenarios":"The overlay contains a FIFO, character/block device, or socket created by a stray shell command, test fixture, or accidental mkfifo.","commonSituations":"A leftover mkfifo from a test; a device node copied inadvisably; a socket file dropped by a daemon into the overlay directory.","solutions":["Remove the special file from the overlay.","Audit the overlay with stat: reject anything that is not stat.S_ISREG or stat.S_ISDIR.","Recreate the overlay from clean Markdown sources."],"exampleFix":"# before: overlay contains a fifo/socket\noverlay/.claude/skills/gitnexus-work/job.fifo\n\n# after: strip non-regular, non-dir entries\nimport os, stat\nfrom pathlib import Path\nfor p in Path('overlay').rglob('*'):\n    m = p.lstat().st_mode\n    if not (stat.S_ISREG(m) or stat.S_ISDIR(m)):\n        p.unlink()","handlingStrategy":"validation","validationCode":"import stat\nfrom pathlib import Path\n\ndef overlay_has_only_regular_and_dirs(root: Path) -> bool:\n    for p in Path(root).rglob('*'):\n        m = p.lstat().st_mode\n        if not (stat.S_ISREG(m) or stat.S_ISDIR(m)):\n            return False\n    return True","typeGuard":"null","tryCatchPattern":"try:\n    apply_candidate_overlay(overlay, worktree, sandbox=sandbox)\nexcept ValueError as exc:\n    if 'must be regular files' in str(exc):\n        # remove the named fifo/device/socket, then retry\n        ...","preventionTips":["Keep the overlay to Markdown files only.","Audit for non-regular entries before running.","Avoid creating the overlay near test fixtures that use mkfifo/sockets."],"tags":["filesystem","overlay","security","trust-boundary"],"backgroundTag":null,"analyzedSha":"d540b00184d71a896261ee02670da9a92d59d8f7","analyzedAt":"2026-08-12T19:50:25.132Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}