{"record":{"id":"71212feb7f1a6000","repo":"abhigyanpatwari/GitNexus","slug":"sanitized-graph-metadata-does-not-prove-a-pdg-bu","errorCode":null,"errorMessage":"sanitized graph metadata does not prove a --pdg build","messagePattern":"sanitized graph metadata does not prove a --pdg build","errorType":"exception","errorClass":"SandboxError","httpStatus":null,"severity":"error","filePath":"eval/workflow_bench/sanitized_graph.py","lineNumber":329,"sourceCode":"    assert node_result is not None and relation_result is not None\n    _parse_empty_query(node_result, label=\"sanitized graph node proof\")\n    _parse_empty_query(relation_result, label=\"sanitized graph relation proof\")\n\n\ndef _validate_graph_metadata(root: Path, sanitized_head: str) -> None:\n    for name in (\"gitnexus.json\", \"meta.json\", \"lbug\"):\n        path = root / \".gitnexus\" / name\n        metadata = path.lstat()\n        if stat.S_ISLNK(metadata.st_mode) or not stat.S_ISREG(metadata.st_mode):\n            raise SandboxError(f\"sanitized graph asset must be regular and non-symlink: {path}\")\n    try:\n        metadata_payload = json.loads((root / \".gitnexus\" / \"gitnexus.json\").read_text())\n    except (OSError, json.JSONDecodeError) as exc:\n        raise SandboxError(\"sanitized graph metadata is malformed\") from exc\n    if metadata_payload.get(\"lastCommit\") != sanitized_head:\n        raise SandboxError(\"sanitized graph metadata is not bound to the parentless task commit\")\n    if not isinstance(metadata_payload.get(\"pdg\"), dict) or not metadata_payload[\"pdg\"]:\n        raise SandboxError(\"sanitized graph metadata does not prove a --pdg build\")\n\n\ndef prepare_sanitized_graph(\n    task: Mapping[str, Any],\n    *,\n    repo: Path,\n    resolved_sha: str,\n    parent: Path,\n    cache: TaskAssetCache,\n    claude_bin: Path | str,\n    bwrap_bin: Path | str,\n    runtime_mounts: Sequence[ReadOnlyMount],\n) -> SanitizedGraphSnapshot:\n    \"\"\"Sanitize, index offline once, scrub, and freeze graph assets for all arms.\"\"\"\n\n    validate_no_prebuilt_graph_assets(task)\n    seed = make_worktree(repo, resolved_sha, parent)\n    primary: BaseException | None = None","sourceCodeStart":311,"sourceCodeEnd":347,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/d540b00184d71a896261ee02670da9a92d59d8f7/eval/workflow_bench/sanitized_graph.py#L311-L347","documentation":"gitnexus.json's pdg field must be a non-empty dict. The harness invokes 'analyze ... --pdg' and then requires proof that PDG layers were actually produced; an absent or empty pdg object means the PDG build was silently skipped or produced nothing.","triggerScenarios":"The analyze --pdg call dropped the flag, the PDG layer produced nothing (no PDG-eligible code), the indexer version does not populate the pdg metadata key, or the flag was stripped by the sandbox prefix.","commonSituations":"A CLI version change that renamed/removed the pdg metadata field; a target repo with no PDG-eligible language; --pdg stripped or overridden in the command vector.","solutions":["Run the analyze command standalone and confirm gitnexus.json contains a non-empty pdg object.","Verify the gitnexus CLI version supports --pdg and writes the pdg metadata field.","If the target genuinely has no PDG-eligible code, the benchmark task is misconfigured for a PDG-bound graph - pick a task with eligible code.","Check the sandbox prefix did not strip --pdg from the argument vector."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import json, os\n\ndef assert_pdg_built(root):\n    payload = json.loads(open(os.path.join(root, \".gitnexus\", \"gitnexus.json\")).read())\n    pdg = payload.get(\"pdg\")\n    if not isinstance(pdg, dict) or not pdg:\n        raise RuntimeError(\"analyze did not produce a non-empty pdg metadata object\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Confirm the gitnexus CLI version supports --pdg and writes the pdg metadata key.","Verify the analyze argument vector includes --pdg end-to-end through the sandbox prefix.","Pick a benchmark task with PDG-eligible code; an empty pdg object means the task is misconfigured."],"tags":["gitnexus","integrity","workflow-bench","sandbox"],"backgroundTag":null,"analyzedSha":"d540b00184d71a896261ee02670da9a92d59d8f7","analyzedAt":"2026-08-12T19:50:25.132Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}