abhigyanpatwari/GitNexus · error · ValueError

promotion binding is missing hidden-oracle files

Error message

promotion binding is missing hidden-oracle files

What it means

Raised by `validate_promotion_for_apply` when a selected task's `oracle_files` is missing, not a list, or empty. Each task must list at least one hidden-oracle file (with target, sha256, size) so apply can verify the oracle was intact.

Source

Thrown at eval/workflow_bench/evolve.py:704

        raise ValueError("promotion binding uses an unsupported schema")
    sha256_pattern = re.compile(r"[0-9a-f]{64}")
    if not selected_tasks:
        raise ValueError("promotion binding has no selected tasks")
    for task in selected_tasks:
        if not isinstance(task, dict) or any(
            not isinstance(task.get(field), str) or sha256_pattern.fullmatch(task[field]) is None
            for field in (
                "oracle_digest",
                "oracle_command_digest",
                "oracle_manifest_digest",
                "sandbox_dependency_content_digest",
                "sandbox_dependency_manifest_digest",
            )
        ):
            raise ValueError("promotion binding is missing hidden-oracle or dependency digests")
        oracle_files = task.get("oracle_files")
        if not isinstance(oracle_files, list) or not oracle_files:
            raise ValueError("promotion binding is missing hidden-oracle files")
        for item in oracle_files:
            if (
                not isinstance(item, dict)
                or not isinstance(item.get("target"), str)
                or not item["target"]
                or not isinstance(item.get("sha256"), str)
                or sha256_pattern.fullmatch(item["sha256"]) is None
                or not isinstance(item.get("size"), int)
                or isinstance(item.get("size"), bool)
                or item["size"] < 0
            ):
                raise ValueError("promotion binding contains malformed hidden-oracle file evidence")
    expected_bindings = {
        "benchmark_model": benchmark_model,
        "proposer_model": proposer_model,
        "candidate_origin": "model-proposer" if proposer_model is not None else "manual-initial-overlay",
        "candidate_overlay_digest": overlay_digest,
        "required_candidate_arms": required_candidate_arms,

View on GitHub (pinned to d540b00184)

Solutions

  1. Ensure every selected task's promotion.json entry has a non-empty oracle_files list.
  2. Re-run the benchmark so the runner records the oracle files for each task.
  3. Fix or remove tasks that legitimately have no oracle files (promotion requires them).
Defensive patterns

Strategy: validation

Validate before calling

for i, t in enumerate(selected_tasks):
    of = t.get('oracle_files')
    if not isinstance(of, list) or not of:
        raise ValueError(f'selected task {i} has no hidden-oracle files')

Type guard

def has_oracle_files(task: dict) -> bool:
    of = task.get('oracle_files')
    return isinstance(of, list) and len(of) > 0

Prevention

When it happens

Trigger: Calling `validate_promotion_for_apply(..., selected_tasks=[...])` where a task has no `oracle_files` key, `oracle_files: null`, or an empty list.

Common situations: A task definition with no oracle files, a promotion.json from a run where oracle file capture failed, or a task whose oracle_files were stripped.

Related errors


AI-assisted analysis of abhigyanpatwari/GitNexus@d540b00184 (2026-08-12). Data as JSON: /api/errors/7c40a5ab058ee42e. Report an issue: GitHub.