{"record":{"id":"809ece5cfc2e2820","repo":"abhigyanpatwari/GitNexus","slug":"task-binding-index-must-be-an-object","errorCode":null,"errorMessage":"task binding {index} must be an object","messagePattern":"task binding (.+?) must be an object","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"eval/workflow_bench/runner_tasks.py","lineNumber":135,"sourceCode":"            [\"git\", \"-C\", str(requested_repo), \"rev-parse\", \"--show-toplevel\"],\n            timeout=60,\n        ).stdout_tail.strip()\n        repo_identity = Path(repo_output).resolve()\n        if expected is None:\n            resolved_sha = run_checked(\n                [\n                    \"git\",\n                    \"-C\",\n                    str(repo_identity),\n                    \"rev-parse\",\n                    f\"{task.get('ref', 'HEAD')}^{{commit}}\",\n                ],\n                timeout=60,\n            ).stdout_tail.strip()\n        else:\n            supplied = expected[index]\n            if not isinstance(supplied, dict):\n                raise ValueError(f\"task binding {index} must be an object\")\n            resolved_sha = str(supplied.get(\"resolved_sha\", \"\"))\n        if not re.fullmatch(r\"[0-9a-fA-F]{40,64}\", resolved_sha):\n            raise ValueError(f\"task {task['id']} did not resolve to an immutable commit\")\n        exists = run_managed(\n            [\"git\", \"-C\", str(repo_identity), \"cat-file\", \"-e\", f\"{resolved_sha}^{{commit}}\"],\n            timeout=60,\n        )\n        if not exists.ok:\n            raise ValueError(f\"pinned task commit is unavailable for {task['id']}: {resolved_sha}\")\n        if task_asset_cache is None:\n            dependency_binding = capture_task_dependency_binding(\n                task,\n                repo=repo_identity,\n                resolved_sha=resolved_sha.lower(),\n            )\n        else:\n            dependency_binding = task_asset_cache.prepare(\n                task,","sourceCodeStart":117,"sourceCodeEnd":153,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/d540b00184d71a896261ee02670da9a92d59d8f7/eval/workflow_bench/runner_tasks.py#L117-L153","documentation":"Raised by resolve_task_bindings when an `expected` pin entry is not a dict (runner_tasks.py:133-135). Each pin must be an object carrying at least resolved_sha and the definition fields; a non-object entry (string, number, null, list) is rejected before any field is read.","triggerScenarios":"The --task-bindings-json file contains a top-level list but one element is a bare string SHA or null; a hand-edited pin file with a malformed row.","commonSituations":"Truncating or hand-editing the bindings JSON; a serialization bug that emits scalars.","solutions":["Inspect the bindings JSON: every element must be a JSON object.","Regenerate the bindings file rather than editing it by hand.","Validate with `jq 'map(type == \"object\") | all' bindings.json`."],"exampleFix":"// before: [\"abc123...\", {\"id\":\"t2\",...}]\n// after:  [{\"id\":\"t1\",\"resolved_sha\":\"abc123...\",...}, {\"id\":\"t2\",...}]","handlingStrategy":"type-guard","validationCode":"expected = json.load(open(\"bindings.json\"))\nfor i, entry in enumerate(expected):\n    if not isinstance(entry, dict):\n        raise SystemExit(f\"bindings[{i}] must be an object\")","typeGuard":"def all_bindings_are_objects(expected: list) -> bool:\n    return all(isinstance(e, dict) for e in expected)","tryCatchPattern":null,"preventionTips":["Never hand-edit the bindings JSON; regenerate it.","Validate with `jq 'map(type==\"object\") | all' bindings.json` in CI."],"tags":["workflow-bench","task-binding","json","schema"],"backgroundTag":null,"analyzedSha":"d540b00184d71a896261ee02670da9a92d59d8f7","analyzedAt":"2026-08-12T19:50:25.132Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}