abhigyanpatwari/GitNexus · error · SandboxError

bounded graph-query output was unavailable

Error message

bounded graph-query output was unavailable

What it means

After a successful (result.ok) graph CLI run requested with capture_stdout=True, result.stdout_capture is None or result.stdout_capture_overflow is True. The 2 MiB capture buffer did not yield usable bytes, so the empty-result marker proof cannot be parsed.

Source

Thrown at eval/workflow_bench/sanitized_graph.py:268

    command = [
        *prefix,
        SANDBOX_NODE,
        SANDBOX_GITNEXUS_ENTRYPOINT,
        *arguments,
    ]
    result = run_managed(
        command,
        timeout=timeout,
        env=_graph_environment(),
        require_pid_namespace=True,
        capture_stdout_bytes=(2 * 1024 * 1024 if capture_stdout else None),
    )
    if not result.ok:
        raise ManagedProcessError(command, result)
    if not capture_stdout:
        return None
    if result.stdout_capture is None or result.stdout_capture_overflow:
        raise SandboxError("bounded graph-query output was unavailable")
    return result.stdout_capture


def _marker_predicate(variable: str) -> str:
    literals = ("'" + marker.replace("\\", "\\\\").replace("'", "\\'") + "'" for marker in GRAPH_MARKERS)
    return " OR ".join(f"CAST({variable} AS STRING) CONTAINS {literal}" for literal in literals)


def _parse_empty_query(raw: bytes, *, label: str) -> None:
    try:
        payload = json.loads(raw.decode("utf-8", errors="strict"))
    except (UnicodeError, json.JSONDecodeError) as exc:
        raise SandboxError(f"{label} did not return strict JSON") from exc
    if payload == []:
        return
    if isinstance(payload, dict) and payload.get("row_count") == 0:
        return
    raise SandboxError(f"{label} found recoverable benchmark harness references")

View on GitHub (pinned to d540b00184)

Solutions

  1. Inspect result.stdout_capture_overflow: if True, the row exceeded 2 MiB - investigate why a LIMIT-1 query returned that much (large property) and rule out harness leakage first.
  2. If stdout_capture is None, verify run_managed was called with a non-None capture_stdout_bytes and that the runner actually captures stdout.
  3. Increase capture_stdout_bytes in _run_graph_cli only after confirming the large output is legitimate and not a marker leak (error 568).
Defensive patterns

Strategy: try-catch

Try / catch

from workflow_bench.proposer_sandbox import SandboxError

try:
    prepare_sanitized_graph(task, repo=repo, resolved_sha=sha, ...)
except SandboxError as exc:
    if "bounded graph-query output was unavailable" in str(exc):
        log.error("stdout capture missing/overflowed - inspect run_managed capture wiring")
    raise

Prevention

When it happens

Trigger: _run_graph_cli returns ok but the capture is missing (run_managed plumbing did not attach a capture) or overflowed: the LIMIT 1 cypher proof returned a row whose serialized form exceeded 2 MiB.

Common situations: Capture wiring regression after a run_managed change; a node carrying a multi-MiB property blob; a CLI emitting an error document > 2 MiB to stdout while still exiting 0.

Related errors


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