{"record":{"id":"d006a7c6b3cfb122","repo":"abhigyanpatwari/GitNexus","slug":"arms-must-name-exactly-the-minimal-incumbent-set","errorCode":null,"errorMessage":"--arms must name exactly the minimal incumbent set for this overlay: ","messagePattern":"--arms must name exactly the minimal incumbent set for this overlay: ","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"eval/workflow_bench/evolve.py","lineNumber":557,"sourceCode":"            try:\n                runner.remove_clone(clone)\n            except OSError as cleanup:\n                if primary is None:\n                    raise\n                primary.add_note(f\"proposer clone cleanup also failed: {type(cleanup).__name__}: {cleanup}\")\n\n\n# Promotion application lives in promotion_apply; the public helpers are\n# re-exported above so existing callers of workflow_bench.evolve keep working.\n\n# ─── Driver ──────────────────────────────────────────────────────────────────\n\n\ndef 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","sourceCodeStart":539,"sourceCodeEnd":575,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/d540b00184d71a896261ee02670da9a92d59d8f7/eval/workflow_bench/evolve.py#L539-L575","documentation":"Raised by `resolve_incumbent_arms` when an explicit `--arms` list is given but does not exactly equal the minimal incumbent set the overlay requires (derived from `required_candidate_arms(overlay)` via the skills the overlay actually touches). The user-selected arms must match the overlay's skill coverage.","triggerScenarios":"Invoked from `runner_argv` (building the benchmark command) or `main` (validating --initial-overlay): `resolve_incumbent_arms(overlay, args.arms)` where args.arms != the arms implied by the overlay's candidate files.","commonSituations":"Passing `--arms workflow_direct` for an overlay that also modifies gitnexus-plan (which requires the `workflow` arm), or vice versa; or listing arms in a different order than the canonical CANDIDATE_ARMS derivation.","solutions":["Omit --arms entirely and let the harness derive the minimal set from the overlay.","Or run `required_candidate_arms(overlay)` to learn the exact required list, then pass that exact set in the same order.","Make sure the overlay only edits skills for the arms you intend to benchmark."],"exampleFix":"# before: overlay edits both gitnexus-plan and gitnexus-work, but you pass only\n#   --arms workflow_direct   (workflow_direct exercises only gitnexus-work)\n# after: omit --arms, or pass the derived set, e.g.\n#   --arms workflow workflow_direct","handlingStrategy":"validation","validationCode":"from workflow_bench.evolution import required_candidate_arms, CANDIDATE_ARMS\nrequired = [CANDIDATE_ARMS[c] for c in required_candidate_arms(overlay)]\nif explicit_arms is not None and explicit_arms != required:\n    raise ValueError(f'--arms must be exactly {required} (got {explicit_arms})')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Prefer deriving arms from the overlay; only pass --arms when you must pin them.","Remember CANDIDATE_ARMS maps candidate_workflow->workflow and candidate_workflow_direct->workflow_direct."],"tags":["python","workflow-bench","config","arms","cli"],"backgroundTag":null,"analyzedSha":"d540b00184d71a896261ee02670da9a92d59d8f7","analyzedAt":"2026-08-12T19:50:25.132Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}