abhigyanpatwari/GitNexus · error · ValueError
task count, runs, and session timeout must be positive
Error message
task count, runs, and session timeout must be positive
What it means
Raised by `generation_timeout_seconds` when any of task_count, runs, or session_timeout is less than 1. These dimension a sequential benchmark budget and must be positive integers.
Source
Thrown at eval/workflow_bench/evolve.py:571
def resolve_incumbent_arms(overlay: Path, explicit_arms: list[str] | None) -> list[str]:
candidates = required_candidate_arms(overlay)
required = [CANDIDATE_ARMS[candidate] for candidate in candidates]
if explicit_arms is not None and explicit_arms != required:
raise ValueError("--arms must name exactly the minimal incumbent set for this overlay: " + " ".join(required))
return required
def generation_timeout_seconds(
*,
task_count: int,
runs: int,
session_timeout: int,
incumbent_arms: list[str],
) -> int:
"""Budget every sequential bounded phase in the generated benchmark."""
if task_count < 1 or runs < 1 or session_timeout < 1:
raise ValueError("task count, runs, and session timeout must be positive")
try:
session_slots = sum(2 * ARM_SESSION_COUNTS[arm] for arm in incumbent_arms)
except KeyError as exc:
raise ValueError(f"unsupported evolution arm: {exc.args[0]}") from exc
paired_arm_cells = 2 * len(incumbent_arms)
workspace_snapshot_slots = sum(2 * ARM_WORKSPACE_SNAPSHOT_COUNTS[arm] for arm in incumbent_arms)
per_task_preparation = (
TASK_BINDING_GIT_PHASES * GIT_COMMAND_TIMEOUT_SECONDS
+ 2 * TASK_SNAPSHOT_TIMEOUT_SECONDS
+ WORKTREE_PREPARATION_TIMEOUT_SECONDS
+ GRAPH_SOURCE_PREPARATION_TIMEOUT_SECONDS
+ GRAPH_BUILD_TIMEOUT_SECONDS
+ 2 * GRAPH_QUERY_TIMEOUT_SECONDS
+ CLEANUP_TIMEOUT_SECONDS
)
per_task_run = session_slots * (session_timeout + SESSION_FINALIZATION_TIMEOUT_SECONDS) + paired_arm_cells * (
WORKTREE_PREPARATION_TIMEOUT_SECONDS
+ ARM_ASSET_MATERIALIZATION_PHASES * TASK_SNAPSHOT_TIMEOUT_SECONDSView on GitHub (pinned to d540b00184)
Solutions
- Pass --runs >= 3 (the promotion gate minimum) and --timeout >= 1.
- Ensure the tasks file selects at least one task (check `selected {n} task(s)` output).
- If calling generation_timeout_seconds directly, assert all three ints are >= 1 first.
Example fix
// before: --runs 0 --timeout 3600 // after: --runs 3 --timeout 3600
Defensive patterns
Strategy: validation
Validate before calling
if task_count < 1 or runs < 1 or session_timeout < 1:
raise ValueError('task_count, runs, session_timeout must all be >= 1') Prevention
- Use --runs >= 3 (gate minimum); validate counts before budgeting.
When it happens
Trigger: Calling `generation_timeout_seconds(task_count=..., runs=..., session_timeout=..., incumbent_arms=...)` with a zero or negative task_count/runs/session_timeout. In practice this stems from CLI args (--runs 0, --timeout 0) or a caller computing counts wrong.
Common situations: Passing `--runs 0` (the gate needs >=3), `--timeout 0`, or a tasks file that selects zero tasks feeding task_count=0.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- --arms must name exactly the minimal incumbent set for this
- unsupported evolution arm: {exc.args[0]}
- transcript_artifacts must be a list
- promotion binding uses an unsupported schema
- promotion binding has no selected tasks
AI-assisted analysis of abhigyanpatwari/GitNexus@d540b00184 (2026-08-12).
Data as JSON: /api/errors/3e94a8f7bc662967.
Report an issue: GitHub.