abhigyanpatwari/GitNexus · error · SandboxError
transcript artifact size does not match its results row: {pa
Error message
transcript artifact size does not match its results row: {path} What it means
Raised by `_bound_transcript_artifact` when the transcript file's actual byte size does not equal the `bytes` field recorded in its evidence metadata. The size is pinned in results.jsonl and checked against the file on disk.
Source
Thrown at eval/workflow_bench/evolve.py:398
seen_paths.add(normalized)
artifacts_by_row.append(artifacts)
return artifacts_by_row
def _bound_transcript_artifact(root: Path, metadata: Any) -> str:
relative, expected_digest, expected_size = _transcript_artifact_metadata(metadata)
path = _results_artifact_path(root, relative, transcript=True)
try:
before = path.lstat()
except OSError as exc:
raise SandboxError(f"transcript artifact is unavailable: {path}: {exc}") from exc
if stat.S_ISLNK(before.st_mode) or not stat.S_ISREG(before.st_mode):
raise SandboxError(f"transcript artifact must be a regular non-symlink file: {path}")
if stat.S_IMODE(before.st_mode) & 0o077:
raise SandboxError(f"transcript artifact must be owner-only: {path}")
if before.st_size != expected_size:
raise SandboxError(f"transcript artifact size does not match its results row: {path}")
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)View on GitHub (pinned to d540b00184)
Solutions
- Recompute each transcript's size and compare to results.jsonl's `bytes` field.
- Regenerate the whole results dir so results.jsonl and transcripts/ are consistent.
- If only one file drifted, restore it from a trusted copy with the exact bytes.
Defensive patterns
Strategy: validation
Validate before calling
mismatches = []
for r in evidence:
for a in r.get('transcript_artifacts', []):
actual = (results_dir / a['path']).stat().st_size
if actual != a['bytes']:
mismatches.append((a['path'], a['bytes'], actual))
if mismatches:
raise ValueError(f'size mismatches (expected, actual): {mismatches}') Prevention
- Regenerate results.jsonl and transcripts together; never edit one without the other.
When it happens
Trigger: `proposer_evidence_entries` reads a results dir whose transcript file was truncated, appended to, or replaced with a different-sized copy after results.jsonl was written.
Common situations: A partial file copy, a log-rotation tool truncating transcripts, or a results dir from a re-run whose results.jsonl still references the old sizes.
Related errors
- transcript_artifacts must be a list
- transcript_artifacts exceeds the per-row session limit of {M
- transcript_artifacts exceeds the global evidence limit of {M
- duplicate transcript artifact path: {normalized}
- transcript artifact is unavailable: {path}: {exc}
AI-assisted analysis of abhigyanpatwari/GitNexus@d540b00184 (2026-08-12).
Data as JSON: /api/errors/78a93679eb28e62b.
Report an issue: GitHub.