{"record":{"id":"291be2d605d348d1","repo":"abhigyanpatwari/GitNexus","slug":"dependency-snapshot-is-empty-declaration-source","errorCode":null,"errorMessage":"dependency snapshot is empty: {declaration.source}","messagePattern":"dependency snapshot is empty: (.+?)","errorType":"exception","errorClass":"SandboxError","httpStatus":null,"severity":"error","filePath":"eval/workflow_bench/task_assets.py","lineNumber":289,"sourceCode":"                    payload_entry = dependency_builder.entries.get(PurePosixPath(\"payload\"))\n                    if (\n                        payload_entry is not None\n                        and payload_entry.kind == \"directory\"\n                        and PurePosixPath(declaration.target).name == DEPENDENCY_MOUNT_BASENAME\n                    ):\n                        dependency_builder.ensure_directory(PurePosixPath(\"payload\") / VITE_TEMP_DIR)\n                    dependency_entries = dependency_builder.finished_entries()\n                    _validate_dependency_symlinks(\n                        container,\n                        dependency_entries,\n                        mount_target=declaration.target_path,\n                    )\n                    payload = next(\n                        (entry for entry in dependency_entries if entry.path == PurePosixPath(\"payload\")),\n                        None,\n                    )\n                    if payload is None:\n                        raise SandboxError(f\"dependency snapshot is empty: {declaration.source}\")\n                    dependency_snapshots.append(\n                        DependencySnapshot(\n                            source=declaration.source,\n                            target=declaration.target,\n                            snapshot_path=PurePosixPath(\"dependencies\", container_name, \"payload\"),\n                            kind=payload.kind,\n                            entries=dependency_entries,\n                            total_bytes=dependency_builder.total_bytes,\n                        )\n                    )\n            finally:\n                os.close(repo_fd)\n\n            entries = builder.finished_entries()\n            manifest_digest = _manifest_digest(entries)\n            dependencies = tuple(dependency_snapshots)\n            dependency_content_digest, dependency_manifest_digest = _dependency_digests(dependencies)\n            if expected_dependency_binding is not None:","sourceCodeStart":271,"sourceCodeEnd":307,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/d540b00184d71a896261ee02670da9a92d59d8f7/eval/workflow_bench/task_assets.py#L271-L307","documentation":"After copying a declared dependency into its container, no payload entry exists in the manifest - _SnapshotBuilder.copy_descriptor recorded nothing under payload. The dependency source resolved to an empty (or non-capturable) tree, so there is nothing to mount.","triggerScenarios":"A sandbox_dependencies entry whose source resolves to an empty directory (or a path with no capturable entries) is prepared via TaskAssetCache.prepare.","commonSituations":"Declaring a dependency on node_modules before install; pointing source at an empty/generated folder; a source path that exists but contains only entries the copier skips.","solutions":["Confirm the dependency source path in the repo is non-empty before declaring it.","Run install/generation so the source tree is populated.","If empty is legitimately invalid for this dependency, remove the declaration."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import os\n\ndef assert_dependency_source_nonempty(repo, source):\n    root = os.path.join(repo, source)\n    if not os.path.exists(root):\n        raise RuntimeError(f\"dependency source missing: {source}\")\n    if os.path.isdir(root) and not any(os.scandir(root)):\n        raise RuntimeError(f\"dependency source is empty: {source}\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run install/generation before declaring a dependency source.","Confirm the source path exists and is non-empty at declaration time.","Remove declarations for dependencies that are legitimately empty."],"tags":["validation","workflow-bench","dependencies"],"backgroundTag":null,"analyzedSha":"d540b00184d71a896261ee02670da9a92d59d8f7","analyzedAt":"2026-08-12T19:50:25.132Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}