{"record":{"id":"3e94a8f7bc662967","repo":"abhigyanpatwari/GitNexus","slug":"task-count-runs-and-session-timeout-must-be-posi","errorCode":null,"errorMessage":"task count, runs, and session timeout must be positive","messagePattern":"task count, runs, and session timeout must be positive","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"eval/workflow_bench/evolve.py","lineNumber":571,"sourceCode":"def resolve_incumbent_arms(overlay: Path, explicit_arms: list[str] | None) -> list[str]:\n    candidates = required_candidate_arms(overlay)\n    required = [CANDIDATE_ARMS[candidate] for candidate in candidates]\n    if explicit_arms is not None and explicit_arms != required:\n        raise ValueError(\"--arms must name exactly the minimal incumbent set for this overlay: \" + \" \".join(required))\n    return required\n\n\ndef generation_timeout_seconds(\n    *,\n    task_count: int,\n    runs: int,\n    session_timeout: int,\n    incumbent_arms: list[str],\n) -> int:\n    \"\"\"Budget every sequential bounded phase in the generated benchmark.\"\"\"\n\n    if task_count < 1 or runs < 1 or session_timeout < 1:\n        raise ValueError(\"task count, runs, and session timeout must be positive\")\n    try:\n        session_slots = sum(2 * ARM_SESSION_COUNTS[arm] for arm in incumbent_arms)\n    except KeyError as exc:\n        raise ValueError(f\"unsupported evolution arm: {exc.args[0]}\") from exc\n    paired_arm_cells = 2 * len(incumbent_arms)\n    workspace_snapshot_slots = sum(2 * ARM_WORKSPACE_SNAPSHOT_COUNTS[arm] for arm in incumbent_arms)\n    per_task_preparation = (\n        TASK_BINDING_GIT_PHASES * GIT_COMMAND_TIMEOUT_SECONDS\n        + 2 * TASK_SNAPSHOT_TIMEOUT_SECONDS\n        + WORKTREE_PREPARATION_TIMEOUT_SECONDS\n        + GRAPH_SOURCE_PREPARATION_TIMEOUT_SECONDS\n        + GRAPH_BUILD_TIMEOUT_SECONDS\n        + 2 * GRAPH_QUERY_TIMEOUT_SECONDS\n        + CLEANUP_TIMEOUT_SECONDS\n    )\n    per_task_run = session_slots * (session_timeout + SESSION_FINALIZATION_TIMEOUT_SECONDS) + paired_arm_cells * (\n        WORKTREE_PREPARATION_TIMEOUT_SECONDS\n        + ARM_ASSET_MATERIALIZATION_PHASES * TASK_SNAPSHOT_TIMEOUT_SECONDS","sourceCodeStart":553,"sourceCodeEnd":589,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/d540b00184d71a896261ee02670da9a92d59d8f7/eval/workflow_bench/evolve.py#L553-L589","documentation":"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.","triggerScenarios":"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.","commonSituations":"Passing `--runs 0` (the gate needs >=3), `--timeout 0`, or a tasks file that selects zero tasks feeding task_count=0.","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."],"exampleFix":"// before: --runs 0 --timeout 3600\n// after:  --runs 3 --timeout 3600","handlingStrategy":"validation","validationCode":"if task_count < 1 or runs < 1 or session_timeout < 1:\n    raise ValueError('task_count, runs, session_timeout must all be >= 1')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use --runs >= 3 (gate minimum); validate counts before budgeting."],"tags":["python","workflow-bench","config","cli","validation"],"backgroundTag":null,"analyzedSha":"d540b00184d71a896261ee02670da9a92d59d8f7","analyzedAt":"2026-08-12T19:50:25.132Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}