{"record":{"id":"f89fbe2a057aedd5","repo":"abhigyanpatwari/GitNexus","slug":"task-binding-definition-drifted-for-task-id","errorCode":null,"errorMessage":"task binding definition drifted for {task['id']}","messagePattern":"task binding definition drifted for (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"eval/workflow_bench/runner_tasks.py","lineNumber":166,"sourceCode":"                repo=repo_identity,\n                resolved_sha=resolved_sha.lower(),\n            )\n        else:\n            dependency_binding = task_asset_cache.prepare(\n                task,\n                repo=repo_identity,\n                resolved_sha=resolved_sha.lower(),\n            ).dependency_binding\n        definition = _task_definition_binding(\n            task,\n            repo_identity,\n            oracle_snapshot,\n            dependency_binding,\n        )\n        if expected is not None:\n            supplied_definition = {key: supplied.get(key) for key in definition}\n            if supplied_definition != definition:\n                raise ValueError(f\"task binding definition drifted for {task['id']}\")\n        bindings.append({**definition, \"resolved_sha\": resolved_sha.lower()})\n    return bindings\n\n\ndef selected_task_bindings(tasks: list[dict[str, Any]]) -> list[dict[str, Any]]:\n    \"\"\"Compatibility wrapper for callers that need newly resolved task pins.\"\"\"\n\n    return resolve_task_bindings(tasks)\n","sourceCodeStart":148,"sourceCodeEnd":175,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/d540b00184d71a896261ee02670da9a92d59d8f7/eval/workflow_bench/runner_tasks.py#L148-L175","documentation":"Raised by resolve_task_bindings when an `expected` pin's definition fields (id, class, repo_identity, ref, prompt_digest, setup_digest, verify_digest, expensive, sandbox_copy, sandbox_dependencies, plus oracle/dependency digests) do not match the freshly-computed definition for the current task (runner_tasks.py:163-166). This is the drift detector: the pinned binding no longer reflects the current task text/config.","triggerScenarios":"The task prompt, verify, setup, repo path, sandbox_copy, sandbox_dependencies, or oracle declaration changed since the pin was recorded; the repo_identity resolved differently (different checkout location); ref changed.","commonSituations":"Editing a prompt and reusing a stale pin; moving the repo checkout; changing sandbox_dependencies without regenerating bindings; the pin was captured against a different ref.","solutions":["Regenerate the bindings JSON from the current tasks/repo state (omit --task-bindings-json once).","If the change is intentional, commit the new bindings alongside the task edit.","Compare each definition key in the pin against the freshly resolved one to find which field drifted."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"# Detect drift by re-resolving without the pin and comparing definition keys.\nfresh = resolve_task_bindings(tasks, None)\nfor old, new in zip(expected, fresh):\n    drift = {k: (old.get(k), new[k]) for k in new if old.get(k) != new[k]}\n    if drift:\n        raise SystemExit(f\"binding drift for {new['id']}: {drift}\")","typeGuard":null,"tryCatchPattern":"try:\n    bindings = resolve_task_bindings(tasks, expected)\nexcept ValueError as exc:\n    if \"definition drifted\" in str(exc):\n        # task text/config changed intentionally — refresh the pin\n        expected = resolve_task_bindings(tasks, None)\n        bindings = resolve_task_bindings(tasks, expected)\n    else:\n        raise","preventionTips":["Regenerate the bindings JSON whenever prompt/verify/setup/repo/dependencies change.","Commit task edits and the refreshed bindings in the same commit.","Treat drift as expected after any prompt edit, not as an anomaly."],"tags":["workflow-bench","task-binding","drift","reproducibility"],"backgroundTag":null,"analyzedSha":"d540b00184d71a896261ee02670da9a92d59d8f7","analyzedAt":"2026-08-12T19:50:25.132Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}