{"record":{"id":"eb2d107bfe47ee42","repo":"abhigyanpatwari/GitNexus","slug":"transcript-artifact-exceeds-the-bounded-run-output","errorCode":null,"errorMessage":"transcript artifact exceeds the bounded run-output limit","messagePattern":"transcript artifact exceeds the bounded run-output limit","errorType":"exception","errorClass":"SandboxError","httpStatus":null,"severity":"error","filePath":"eval/workflow_bench/evolve.py","lineNumber":340,"sourceCode":"    return root / Path(*relative.parts)\n\n\ndef _transcript_artifact_metadata(metadata: Any) -> tuple[str, str, int]:\n    \"\"\"Validate transcript metadata without touching any host path.\"\"\"\n\n    if not isinstance(metadata, dict) or set(metadata) != {\"path\", \"sha256\", \"bytes\", \"source\"}:\n        raise SandboxError(\"transcript artifact metadata must contain only path, sha256, bytes, and source\")\n    relative = metadata[\"path\"]\n    expected_digest = metadata[\"sha256\"]\n    expected_size = metadata[\"bytes\"]\n    if metadata[\"source\"] != runner_sessions.PARENT_EVENT_STREAM_SOURCE:\n        raise SandboxError(\"transcript artifact source is not the parent event stream\")\n    if not isinstance(relative, str) or not re.fullmatch(r\"[0-9a-f]{64}\", str(expected_digest)):\n        raise SandboxError(\"transcript artifact metadata is malformed\")\n    if not isinstance(expected_size, int) or isinstance(expected_size, bool):\n        raise SandboxError(\"transcript artifact byte count must be an integer\")\n    if expected_size < 0 or expected_size > runner.MAX_TRANSCRIPT_BYTES:\n        raise SandboxError(\"transcript artifact exceeds the bounded run-output limit\")\n    return relative, expected_digest, expected_size\n\n\ndef _normalized_transcript_artifact_path(relative_value: str) -> str:\n    \"\"\"Apply the transcript path contract without touching the filesystem.\"\"\"\n\n    relative = PurePosixPath(relative_value)\n    if (\n        relative.is_absolute()\n        or len(relative.parts) != 2\n        or relative.parts[0] != \"transcripts\"\n        or any(part in {\"\", \".\", \"..\"} for part in relative.parts)\n    ):\n        raise SandboxError(f\"unsafe results artifact path: {relative_value!r}\")\n    return relative.as_posix()\n\n\ndef _preflight_transcript_artifacts(evidence: list[dict[str, Any]]) -> list[list[Any]]:","sourceCodeStart":322,"sourceCodeEnd":358,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/d540b00184d71a896261ee02670da9a92d59d8f7/eval/workflow_bench/evolve.py#L322-L358","documentation":"After type checks, the size must satisfy 0 <= bytes <= runner.MAX_TRANSCRIPT_BYTES (8 MiB). A negative value or a value above the bound is rejected so a single oversized (or crafted) transcript cannot exhaust proposer context or memory during evidence read.","triggerScenarios":"A transcript larger than 8 MiB (verbose agent session with full event echo); a negative size from a corrupt row; a size computed before the file finished writing.","commonSituations":"Very long sessions; debug-level event capture; a race where the size was read mid-write; integer underflow in a custom writer.","solutions":["Reduce transcript verbosity at capture time (drop redundant tool outputs) so the file stays under 8 MiB.","If a genuinely large transcript is needed, raise runner.MAX_TRANSCRIPT_BYTES deliberately and audit the proposer context budget.","Re-measure the size after the file is fully written and rewrite the row."],"exampleFix":"# before: 12 MiB transcript admitted\nrow = {..., \"bytes\": 12 * 1024 * 1024}\n\n# after: trim at capture time, then record the real post-trim size\nsize = path.stat().st_size\nassert size <= runner.MAX_TRANSCRIPT_BYTES, size\nrow = {..., \"bytes\": size}","handlingStrategy":"validation","validationCode":"from eval.workflow_bench.runner_sessions import MAX_TRANSCRIPT_BYTES\n\ndef transcript_size_within_bound(metadata: dict) -> bool:\n    n = metadata.get(\"bytes\")\n    return isinstance(n, int) and not isinstance(n, bool) and 0 <= n <= MAX_TRANSCRIPT_BYTES","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Cap transcript verbosity at capture so files stay under 8 MiB.","Measure size after the file is fully written; a mid-write size can lie.","If you must raise the bound, also re-audit the proposer context budget."],"tags":["workflow-bench","sandbox","size-limit","transcript","validation","resource-bound"],"backgroundTag":null,"analyzedSha":"d540b00184d71a896261ee02670da9a92d59d8f7","analyzedAt":"2026-08-12T19:50:25.132Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}