{"record":{"id":"1b30a664bed93d1a","repo":"abhigyanpatwari/GitNexus","slug":"transcript-artifact-digest-does-not-match-its-resu","errorCode":null,"errorMessage":"transcript artifact digest does not match its results row: {path}","messagePattern":"transcript artifact digest does not match its results row: (.+?)","errorType":"exception","errorClass":"SandboxError","httpStatus":null,"severity":"critical","filePath":"eval/workflow_bench/evolve.py","lineNumber":418,"sourceCode":"    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)\n        if (opened.st_size, opened.st_mtime_ns) != (after.st_size, after.st_mtime_ns):\n            raise SandboxError(f\"transcript artifact changed while reading: {path}\")\n    finally:\n        os.close(descriptor)\n    if digest.hexdigest() != expected_digest:\n        raise SandboxError(f\"transcript artifact digest does not match its results row: {path}\")\n    return bytes(content).decode(errors=\"replace\")\n\n\ndef proposer_evidence_entries(\n    *,\n    results_dir: Path | None,\n    evidence: list[dict[str, Any]],\n    learnings: list[dict[str, Any]],\n    gate_summary: list[str],\n) -> dict[str, Any]:\n    \"\"\"Only structured, bounded evidence crosses into the proposer.\"\"\"\n\n    artifacts_by_row = _preflight_transcript_artifacts(evidence)\n    entries: dict[str, Any] = {\n        \"selected-rows.json\": [compact_row(row) for row in evidence],\n        \"learnings.json\": learnings,\n        \"gate-summary.json\": gate_summary,\n    }","sourceCodeStart":400,"sourceCodeEnd":436,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/d540b00184d71a896261ee02670da9a92d59d8f7/eval/workflow_bench/evolve.py#L400-L436","documentation":"Raised by `_bound_transcript_artifact` after hashing the file's bytes with SHA-256: the computed digest does not equal the `sha256` recorded in evidence metadata. This is the final integrity check confirming the bytes are exactly what results.jsonl pinned.","triggerScenarios":"The transcript file content was altered (truncated, edited, partially overwritten) so its sha256 no longer matches results.jsonl, even though size may still match.","commonSituations":"Post-hoc editing of a transcript, a transfer that silently corrupted bytes, or tampering with evidence before promotion.","solutions":["Regenerate the results dir from the original run so transcripts and their recorded digests agree.","If you edited transcripts deliberately, recompute sha256/bytes and update results.jsonl to match (and re-run any integrity tests).","Treat an unexpected mismatch as corruption/tampering and restore from a trusted source."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import hashlib\nbad = []\nfor r in evidence:\n    for a in r.get('transcript_artifacts', []):\n        h = hashlib.sha256((results_dir / a['path']).read_bytes()).hexdigest()\n        if h != a['sha256']:\n            bad.append(a['path'])\nif bad:\n    raise ValueError(f'transcript digest mismatch: {bad}')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never edit transcript files; they are append-only run artifacts.","Verify `sha256sum transcripts/*` matches results.jsonl before running evolve."],"tags":["python","workflow-bench","evidence","integrity","sha256","security"],"backgroundTag":null,"analyzedSha":"d540b00184d71a896261ee02670da9a92d59d8f7","analyzedAt":"2026-08-12T19:50:25.132Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}