{"record":{"id":"2781e4debc80ddee","repo":"abhigyanpatwari/GitNexus","slug":"task-task-id-oracle-files-must-contain-1-max-o","errorCode":null,"errorMessage":"task {task_id} oracle files must contain 1..{MAX_ORACLE_FILES} entries","messagePattern":"task (.+?) oracle files must contain 1\\.\\.(.+?) entries","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"eval/workflow_bench/oracle_assets.py","lineNumber":100,"sourceCode":"\ndef validate_oracle_declaration(task: dict[str, Any]) -> None:\n    \"\"\"Validate the declarative shape without reading harness-owned files.\"\"\"\n\n    task_id = str(task.get(\"id\", \"<unknown>\"))\n    oracle = task.get(\"oracle\")\n    if not isinstance(oracle, dict) or set(oracle) != {\"command\", \"files\"}:\n        raise ValueError(f\"task {task_id} oracle requires exactly command and files\")\n    command = oracle.get(\"command\")\n    if (\n        not isinstance(command, str)\n        or not command.strip()\n        or len(command.encode()) > MAX_ORACLE_COMMAND_BYTES\n        or \"\\x00\" in command\n    ):\n        raise ValueError(f\"task {task_id} oracle command must be nonblank and bounded\")\n    files = oracle.get(\"files\")\n    if not isinstance(files, list) or not files or len(files) > MAX_ORACLE_FILES:\n        raise ValueError(f\"task {task_id} oracle files must contain 1..{MAX_ORACLE_FILES} entries\")\n    sources: set[str] = set()\n    targets: set[str] = set()\n    for index, declaration in enumerate(files):\n        if not isinstance(declaration, dict) or set(declaration) != {\"source\", \"target\"}:\n            raise ValueError(f\"task {task_id} oracle file {index} requires exactly source and target\")\n        source = _bounded_relative_path(declaration.get(\"source\"), label=f\"task {task_id} oracle source\")\n        target = _bounded_relative_path(declaration.get(\"target\"), label=f\"task {task_id} oracle target\")\n        if source.as_posix() in sources:\n            raise ValueError(f\"task {task_id} oracle source is duplicated: {source}\")\n        if target.as_posix() in targets:\n            raise ValueError(f\"task {task_id} oracle target is duplicated: {target}\")\n        sources.add(source.as_posix())\n        targets.add(target.as_posix())\n\n\ndef _real_oracle_root(root: Path) -> Path:\n    lexical = root.expanduser().absolute()\n    try:","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/d540b00184d71a896261ee02670da9a92d59d8f7/eval/workflow_bench/oracle_assets.py#L82-L118","documentation":"Raised when oracle['files'] is not a list, is empty, or contains more than MAX_ORACLE_FILES (8) entries. The harness bounds the oracle file count so capture and verification stay deterministic and fast. An oracle with zero files is meaningless; an oracle with more than eight files is considered out of spec.","triggerScenarios":"oracle['files'] is None, a dict, or a string; an empty list []; a list with 9 or more entries.","commonSituations":"Dropping the files list to [] while editing; accidentally setting files to a single dict instead of a list of dicts; a task that genuinely needs many oracle files exceeding the cap of 8.","solutions":["Ensure oracle['files'] is a list with 1 to 8 dict entries, each shaped {\"source\": ..., \"target\": ...}.","If you need more than 8 files, consolidate oracle data into fewer, larger files (still under per-file and total byte limits).","Confirm the value is a list literal, not a single mapping."],"exampleFix":"// before\noracle = {\"command\": \"pytest\", \"files\": []}\n// after\noracle = {\"command\": \"pytest\", \"files\": [{\"source\": \"expected.txt\", \"target\": \"expected.txt\"}]}","handlingStrategy":"validation","validationCode":"from eval.workflow_bench.oracle_assets import MAX_ORACLE_FILES, validate_oracle_declaration\n\ndef safe_files_check(task):\n    files = task.get(\"oracle\", {}).get(\"files\")\n    if not isinstance(files, list) or not files or len(files) > MAX_ORACLE_FILES:\n        raise ValueError(f\"files must be a list of 1..{MAX_ORACLE_FILES} entries\")\n    validate_oracle_declaration(task)","typeGuard":"def is_valid_oracle_files(files) -> bool:\n    return isinstance(files, list) and 1 <= len(files) <= 8","tryCatchPattern":"try:\n    validate_oracle_declaration(task)\nexcept ValueError as exc:\n    raise SystemExit(str(exc)) from exc","preventionTips":["Cap oracle file count during authoring at well below 8.","Consolidate logically related oracle data into fewer files."],"tags":["python","benchmark","validation","oracle","input-bounds"],"backgroundTag":null,"analyzedSha":"d540b00184d71a896261ee02670da9a92d59d8f7","analyzedAt":"2026-08-12T19:50:25.132Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}