abhigyanpatwari/GitNexus · error · ValueError

task {task_id} sandbox_dependencies entries require nonblank

Error message

task {task_id} sandbox_dependencies entries require nonblank source and target strings

What it means

Raised by select_tasks during per-entry validation of sandbox_dependencies (runner_tasks.py:59-66). Each entry must be a Mapping whose key set is exactly {source, target} and both must be nonblank strings. Extra keys, missing keys, or a source/target that is empty/non-string all trip it.

Source

Thrown at eval/workflow_bench/runner_tasks.py:64

        if task_id in seen:
            raise ValueError(f"duplicate task id: {task_id}")
        seen.add(task_id)
        expensive = task.get("expensive", False)
        if not isinstance(expensive, bool):
            raise ValueError(f"task {task_id} expensive metadata must be boolean")
        copies = task.get("sandbox_copy", [])
        if not isinstance(copies, list) or not all(isinstance(path, str) and path for path in copies):
            raise ValueError(f"task {task_id} sandbox_copy must be a string list")
        dependencies = task.get("sandbox_dependencies", [])
        if not isinstance(dependencies, list):
            raise ValueError(f"task {task_id} sandbox_dependencies must be a list")
        for dependency in dependencies:
            if (
                not isinstance(dependency, Mapping)
                or set(dependency) != {"source", "target"}
                or not all(isinstance(dependency[field], str) and dependency[field] for field in ("source", "target"))
            ):
                raise ValueError(
                    f"task {task_id} sandbox_dependencies entries require nonblank source and target strings"
                )
        validate_oracle_declaration(task)
        if expensive and not include_expensive:
            skipped.append(task_id)
        else:
            selected.append(task)
    if not selected:
        raise ValueError("no tasks selected after expensive-task filtering")
    return selected, skipped


def _task_definition_binding(
    task: dict[str, Any],
    repo_identity: Path,
    oracle_snapshot: TaskOracleSnapshot,
    dependency_binding: Mapping[str, str],
) -> dict[str, Any]:

View on GitHub (pinned to d540b00184)

Solutions

  1. Ensure every dependency entry has exactly source and target keys, both nonblank strings.
  2. Strip any extra keys (mode, flags, etc.) — the schema is intentionally minimal.
  3. Validate programmatically before running the harness.

Example fix

# before
- id: t1
  sandbox_dependencies:
    - source: a
      target: b
      readonly: true
# after
- id: t1
  sandbox_dependencies:
    - source: a
      target: b
Defensive patterns

Strategy: validation

Validate before calling

for i, t in enumerate(doc.get("tasks", [])):
    for dep in t.get("sandbox_dependencies", []):
        if (not isinstance(dep, dict) or set(dep) != {"source", "target"}
                or not all(isinstance(dep[k], str) and dep[k] for k in ("source", "target"))):
            raise SystemExit(f"task {i} dependency entry invalid: {dep!r}")

Type guard

from collections.abc import Mapping
def dependency_entry_is_valid(dep: object) -> bool:
    return (
        isinstance(dep, Mapping)
        and set(dep) == {"source", "target"}
        and all(isinstance(dep[k], str) and dep[k] for k in ("source", "target"))
    )

Prevention

When it happens

Trigger: An entry with only `source`, an entry with `source`/`target`/`mode` (extra key), an entry where source or target is null/empty, or a non-mapping entry (e.g. a string).

Common situations: Adding a `mode` or `readonly` key to a dependency; forgetting the target half; a generator emitting one-field records.

Related errors


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