{"record":{"id":"9fa22c65ee7cc7e0","repo":"abhigyanpatwari/GitNexus","slug":"compound-engineering-plugin-entry-is-unreadable","errorCode":null,"errorMessage":"Compound Engineering plugin entry is unreadable: {entry.path}: {exc}","messagePattern":"Compound Engineering plugin entry is unreadable: (.+?): (.+?)","errorType":"exception","errorClass":"SandboxError","httpStatus":null,"severity":"error","filePath":"eval/workflow_bench/runtime_mounts.py","lineNumber":325,"sourceCode":"\n    skills = source / \"skills\"\n    if not skills.exists():\n        raise SandboxError(f\"Compound Engineering plugin skills directory is missing: {skills}\")\n\n    def walk(directory: Path, relative_dir: PurePosixPath) -> Iterator[tuple[PurePosixPath, Path]]:\n        try:\n            with os.scandir(directory) as scanned:\n                entries = sorted(scanned, key=lambda entry: entry.name)\n        except OSError as exc:\n            raise SandboxError(f\"Compound Engineering plugin directory is unreadable: {directory}: {exc}\") from exc\n        for entry in entries:\n            relative = relative_dir / entry.name\n            if _is_forbidden_plugin_path(relative):\n                continue\n            try:\n                metadata = entry.stat(follow_symlinks=False)\n            except OSError as exc:\n                raise SandboxError(f\"Compound Engineering plugin entry is unreadable: {entry.path}: {exc}\") from exc\n            if stat.S_ISLNK(metadata.st_mode):\n                raise SandboxError(f\"Compound Engineering plugin entries must not be symlinks: {entry.path}\")\n            if stat.S_ISDIR(metadata.st_mode):\n                yield from walk(Path(entry.path), relative)\n            elif stat.S_ISREG(metadata.st_mode):\n                yield relative, Path(entry.path)\n            else:\n                raise SandboxError(f\"Compound Engineering plugin entries must be regular files: {entry.path}\")\n\n    for name in _ALLOWED_PLUGIN_DIRS:\n        directory = source / name\n        if not directory.exists():\n            continue\n        try:\n            metadata = directory.lstat()\n        except OSError as exc:\n            raise SandboxError(f\"Compound Engineering plugin component is unreadable: {directory}: {exc}\") from exc\n        if stat.S_ISLNK(metadata.st_mode) or not stat.S_ISDIR(metadata.st_mode):","sourceCodeStart":307,"sourceCodeEnd":343,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/d540b00184d71a896261ee02670da9a92d59d8f7/eval/workflow_bench/runtime_mounts.py#L307-L343","documentation":"After scandir succeeds, each entry is stat'd with follow_symlinks=False to classify it. OSError on that per-entry stat raises this error, so a file that disappears or becomes inaccessible between scandir and stat is not ignored.","triggerScenarios":"A file is deleted or has its permissions changed between os.scandir and entry.stat; NFS/lazy-filesystem stat failure; ACL denies stat on a specific entry.","commonSituations":"Concurrent builds mutating the plugin tree; flaky network filesystem; per-file ACLs applied inconsistently.","solutions":["Make the plugin source immutable during snapshot build (stop concurrent writers).","Grant read on every file: `chmod -R +r <plugin_dir>`.","Copy the plugin to a stable local directory before pointing --ce-plugin-dir at it."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import os\nfrom pathlib import Path\n\ndef entries_statable(directory: Path) -> bool:\n    try:\n        with os.scandir(directory) as it:\n            for entry in it:\n                entry.stat(follow_symlinks=False)\n    except OSError:\n        return False\n    return True","typeGuard":null,"tryCatchPattern":"try:\n    list(_plugin_files(source))\nexcept SandboxError as exc:\n    if \"entry is unreadable\" in str(exc):\n        # freeze the tree (stop concurrent writers) and re-run\n        ...\n    raise","preventionTips":["Freeze the plugin source (no concurrent writes) during the snapshot build.","Ensure every file is owner-readable by the harness user."],"tags":["ce-plugin","permissions","filesystem","race-condition"],"backgroundTag":null,"analyzedSha":"d540b00184d71a896261ee02670da9a92d59d8f7","analyzedAt":"2026-08-12T19:50:25.132Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}