abhigyanpatwari/GitNexus · critical · SandboxError

transcript artifact digest does not match its results row: {

Error message

transcript artifact digest does not match its results row: {path}

What it means

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.

Source

Thrown at eval/workflow_bench/evolve.py:418

    descriptor = os.open(path, os.O_RDONLY | getattr(os, "O_NOFOLLOW", 0))
    try:
        opened = os.fstat(descriptor)
        if not stat.S_ISREG(opened.st_mode) or opened.st_dev != before.st_dev or opened.st_ino != before.st_ino:
            raise SandboxError(f"transcript artifact changed while opening: {path}")
        digest = hashlib.sha256()
        content = bytearray()
        while chunk := os.read(descriptor, 64 * 1024):
            digest.update(chunk)
            content.extend(chunk)
            if len(content) > MAX_EVIDENCE_FILE_BYTES:
                del content[: len(content) - MAX_EVIDENCE_FILE_BYTES]
        after = os.fstat(descriptor)
        if (opened.st_size, opened.st_mtime_ns) != (after.st_size, after.st_mtime_ns):
            raise SandboxError(f"transcript artifact changed while reading: {path}")
    finally:
        os.close(descriptor)
    if digest.hexdigest() != expected_digest:
        raise SandboxError(f"transcript artifact digest does not match its results row: {path}")
    return bytes(content).decode(errors="replace")


def proposer_evidence_entries(
    *,
    results_dir: Path | None,
    evidence: list[dict[str, Any]],
    learnings: list[dict[str, Any]],
    gate_summary: list[str],
) -> dict[str, Any]:
    """Only structured, bounded evidence crosses into the proposer."""

    artifacts_by_row = _preflight_transcript_artifacts(evidence)
    entries: dict[str, Any] = {
        "selected-rows.json": [compact_row(row) for row in evidence],
        "learnings.json": learnings,
        "gate-summary.json": gate_summary,
    }

View on GitHub (pinned to d540b00184)

Solutions

  1. Regenerate the results dir from the original run so transcripts and their recorded digests agree.
  2. If you edited transcripts deliberately, recompute sha256/bytes and update results.jsonl to match (and re-run any integrity tests).
  3. Treat an unexpected mismatch as corruption/tampering and restore from a trusted source.
Defensive patterns

Strategy: validation

Validate before calling

import hashlib
bad = []
for r in evidence:
    for a in r.get('transcript_artifacts', []):
        h = hashlib.sha256((results_dir / a['path']).read_bytes()).hexdigest()
        if h != a['sha256']:
            bad.append(a['path'])
if bad:
    raise ValueError(f'transcript digest mismatch: {bad}')

Prevention

When it happens

Trigger: The transcript file content was altered (truncated, edited, partially overwritten) so its sha256 no longer matches results.jsonl, even though size may still match.

Common situations: Post-hoc editing of a transcript, a transfer that silently corrupted bytes, or tampering with evidence before promotion.

Related errors


AI-assisted analysis of abhigyanpatwari/GitNexus@d540b00184 (2026-08-12). Data as JSON: /api/errors/1b30a664bed93d1a. Report an issue: GitHub.