{"record":{"id":"33ac5f5ccaeac5f1","repo":"abhigyanpatwari/GitNexus","slug":"transcript-artifact-must-be-a-regular-non-symlink","errorCode":null,"errorMessage":"transcript artifact must be a regular non-symlink file: {path}","messagePattern":"transcript artifact must be a regular non-symlink file: (.+?)","errorType":"exception","errorClass":"SandboxError","httpStatus":null,"severity":"critical","filePath":"eval/workflow_bench/evolve.py","lineNumber":394,"sourceCode":"            relative, _, _ = _transcript_artifact_metadata(artifact)\n            normalized = _normalized_transcript_artifact_path(relative)\n            if normalized in seen_paths:\n                raise SandboxError(f\"duplicate transcript artifact path: {normalized}\")\n            seen_paths.add(normalized)\n        artifacts_by_row.append(artifacts)\n    return artifacts_by_row\n\n\ndef _bound_transcript_artifact(root: Path, metadata: Any) -> str:\n    relative, expected_digest, expected_size = _transcript_artifact_metadata(metadata)\n\n    path = _results_artifact_path(root, relative, transcript=True)\n    try:\n        before = path.lstat()\n    except OSError as exc:\n        raise SandboxError(f\"transcript artifact is unavailable: {path}: {exc}\") from exc\n    if stat.S_ISLNK(before.st_mode) or not stat.S_ISREG(before.st_mode):\n        raise SandboxError(f\"transcript artifact must be a regular non-symlink file: {path}\")\n    if stat.S_IMODE(before.st_mode) & 0o077:\n        raise SandboxError(f\"transcript artifact must be owner-only: {path}\")\n    if before.st_size != expected_size:\n        raise SandboxError(f\"transcript artifact size does not match its results row: {path}\")\n\n    descriptor = os.open(path, os.O_RDONLY | getattr(os, \"O_NOFOLLOW\", 0))\n    try:\n        opened = os.fstat(descriptor)\n        if not stat.S_ISREG(opened.st_mode) or opened.st_dev != before.st_dev or opened.st_ino != before.st_ino:\n            raise SandboxError(f\"transcript artifact changed while opening: {path}\")\n        digest = hashlib.sha256()\n        content = bytearray()\n        while chunk := os.read(descriptor, 64 * 1024):\n            digest.update(chunk)\n            content.extend(chunk)\n            if len(content) > MAX_EVIDENCE_FILE_BYTES:\n                del content[: len(content) - MAX_EVIDENCE_FILE_BYTES]\n        after = os.fstat(descriptor)","sourceCodeStart":376,"sourceCodeEnd":412,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/d540b00184d71a896261ee02670da9a92d59d8f7/eval/workflow_bench/evolve.py#L376-L412","documentation":"Raised by `_bound_transcript_artifact` when the transcript file is a symlink or not a regular file (directory, fifo, socket, device). Symlinks are blocked because they can escape the results root.","triggerScenarios":"A file at `transcripts/<name>` that is a symbolic link, or whose lstat mode is not S_ISREG (e.g. a directory was created where a transcript file is expected).","commonSituations":"Someone symlinked a transcript to shared storage, a broken restore left a directory in place of a file, or an adversarial/tampered results dir tries to redirect reads.","solutions":["Replace the symlink/irregular node with a real, owned regular file containing the transcript bytes.","Re-run the benchmark so the runner writes genuine transcript files.","If this appears unexpectedly, treat it as a potential integrity violation and regenerate the results from a trusted source."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import stat\nfor r in evidence:\n    for a in r.get('transcript_artifacts', []):\n        p = results_dir / a['path']\n        m = p.lstat().st_mode\n        if stat.S_ISLNK(m) or not stat.S_ISREG(m):\n            raise ValueError(f'transcript is not a regular file: {p}')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never symlink files into a results dir; copy real bytes.","After restoring a results dir from archive, lstat every transcript to confirm S_ISREG."],"tags":["python","workflow-bench","sandbox","security","symlink","evidence"],"backgroundTag":null,"analyzedSha":"d540b00184d71a896261ee02670da9a92d59d8f7","analyzedAt":"2026-08-12T19:50:25.132Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}