{"record":{"id":"5af7c95d0ad82747","repo":"abhigyanpatwari/GitNexus","slug":"promotion-binding-has-no-selected-tasks","errorCode":null,"errorMessage":"promotion binding has no selected tasks","messagePattern":"promotion binding has no selected tasks","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"eval/workflow_bench/evolve.py","lineNumber":689,"sourceCode":"\ndef validate_promotion_for_apply(\n    promotion: dict[str, Any],\n    *,\n    overlay_digest: str,\n    benchmark_model: str,\n    proposer_model: str | None,\n    selected_tasks: list[dict[str, Any]],\n    target_base_digests: dict[str, str],\n    required_candidate_arms: list[str],\n    policy: dict[str, Any],\n    now: datetime | None = None,\n) -> list[dict[str, Any]]:\n    \"\"\"Require one complete, current, exact evidence binding before apply.\"\"\"\n    if promotion.get(\"schema_version\") != 3:\n        raise ValueError(\"promotion binding uses an unsupported schema\")\n    sha256_pattern = re.compile(r\"[0-9a-f]{64}\")\n    if not selected_tasks:\n        raise ValueError(\"promotion binding has no selected tasks\")\n    for task in selected_tasks:\n        if not isinstance(task, dict) or any(\n            not isinstance(task.get(field), str) or sha256_pattern.fullmatch(task[field]) is None\n            for field in (\n                \"oracle_digest\",\n                \"oracle_command_digest\",\n                \"oracle_manifest_digest\",\n                \"sandbox_dependency_content_digest\",\n                \"sandbox_dependency_manifest_digest\",\n            )\n        ):\n            raise ValueError(\"promotion binding is missing hidden-oracle or dependency digests\")\n        oracle_files = task.get(\"oracle_files\")\n        if not isinstance(oracle_files, list) or not oracle_files:\n            raise ValueError(\"promotion binding is missing hidden-oracle files\")\n        for item in oracle_files:\n            if (\n                not isinstance(item, dict)","sourceCodeStart":671,"sourceCodeEnd":707,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/d540b00184d71a896261ee02670da9a92d59d8f7/eval/workflow_bench/evolve.py#L671-L707","documentation":"Raised by `validate_promotion_for_apply` when `selected_tasks` is empty. Apply needs at least one digest-bound task to promote; an empty selection carries no evidence.","triggerScenarios":"Calling `validate_promotion_for_apply(..., selected_tasks=[], ...)` — the caller passed an empty task binding list.","commonSituations":"A benchmark that selected zero tasks (empty/over-filtered tasks file), or a driver bug that built an empty selected_tasks list but still reached apply.","solutions":["Ensure the tasks file selects at least one task (check the 'selected N task(s)' log line).","Re-run the benchmark with a non-empty task set so promotion.json contains real selected tasks.","Do not call validate_promotion_for_apply unless there is at least one selected, promoted task."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if not selected_tasks:\n    raise ValueError('cannot apply a promotion with no selected tasks')","typeGuard":"def has_selected_tasks(tasks: list) -> bool:\n    return len(tasks) > 0","tryCatchPattern":null,"preventionTips":["Gate apply on a non-empty, promoted selected_tasks list."],"tags":["python","workflow-bench","promotion","validation","tasks"],"backgroundTag":null,"analyzedSha":"d540b00184d71a896261ee02670da9a92d59d8f7","analyzedAt":"2026-08-12T19:50:25.132Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}