abhigyanpatwari/GitNexus · error · ValueError

promotion binding uses an unsupported schema

Error message

promotion binding uses an unsupported schema

What it means

Raised by `validate_promotion_for_apply` when the promotion binding's `schema_version` is not 3. Promotion application requires the current evidence-binding schema; older or missing versions are refused before any canonical skill is touched.

Source

Thrown at eval/workflow_bench/evolve.py:686

        env["GITNEXUS_BENCH_AUTH_TOKEN"] = args.auth_token
    return env


def validate_promotion_for_apply(
    promotion: dict[str, Any],
    *,
    overlay_digest: str,
    benchmark_model: str,
    proposer_model: str | None,
    selected_tasks: list[dict[str, Any]],
    target_base_digests: dict[str, str],
    required_candidate_arms: list[str],
    policy: dict[str, Any],
    now: datetime | None = None,
) -> list[dict[str, Any]]:
    """Require one complete, current, exact evidence binding before apply."""
    if promotion.get("schema_version") != 3:
        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")

View on GitHub (pinned to d540b00184)

Solutions

  1. Regenerate the promotion.json with the current workflow_bench version so it emits schema_version 3.
  2. If you must apply old evidence, re-run the benchmark/evolution loop to produce a fresh v3 promotion.json.
  3. Never hand-author a promotion.json; the validator also checks digests, bindings, and timestamps.
Defensive patterns

Strategy: validation

Validate before calling

if promotion.get('schema_version') != 3:
    raise ValueError(f'promotion schema_version must be 3, got {promotion.get("schema_version")!r}')

Prevention

When it happens

Trigger: Calling `validate_promotion_for_apply(promotion, ...)` where `promotion['schema_version']` is absent, 1, 2, or any non-3 value. `promotion` is loaded from a run's promotion.json.

Common situations: Applying a promotion.json produced by an older workflow_bench version (schema 1/2), a hand-written promotion.json, or a results dir whose promotion.json predates the v3 binding.

Related errors


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