nexu-io/open-design · error · SystemExit

job {job_id} uses a synthetic test source; rerun with real $

Error message

job {job_id} uses a synthetic test source; rerun with real $imagegen output

What it means

Raised when a job has synthetic_test_source truthy and the hidden --allow-synthetic-test-sources flag was not passed. The default behavior blocks synthetic test sources from shipping; the flag exists only for local tests and is suppressed in argparse help.

Source

Thrown at skills/hatch-pet/scripts/finalize_pet_run.py:146

) -> None:
    job_id = str(job.get("id") or "")
    source = manifest_path(job.get("source_path"), run_dir=run_dir, field="source_path", job_id=job_id)
    output = manifest_path(job.get("output_path"), run_dir=run_dir, field="output_path", job_id=job_id)

    blocked_flags = [
        flag
        for flag in ("deterministic_pet_row", "cute_raster_row", "local_raster_row")
        if job.get(flag)
    ]
    if blocked_flags:
        raise SystemExit(
            f"job {job_id} was marked as a local/synthetic row ({', '.join(blocked_flags)}); "
            "regenerate it with $imagegen"
        )

    if job.get("synthetic_test_source"):
        if not allow_synthetic_test_sources:
            raise SystemExit(
                f"job {job_id} uses a synthetic test source; rerun with real $imagegen output"
            )
        validate_hash(job, source=source, output=output, job_id=job_id)
        return

    if job.get("secondary_fallback"):
        if job.get("source_provenance") != "secondary-fallback-image-api":
            raise SystemExit(f"job {job_id} has invalid secondary fallback provenance")
        validate_hash(job, source=source, output=output, job_id=job_id)
        return

    if job.get("source_provenance") == "deterministic-mirror":
        validate_mirror_hash(job, source=source, output=output, job_id=job_id)
        return

    if job.get("source_provenance") != "built-in-imagegen":
        raise SystemExit(
            f"job {job_id} was not recorded as a built-in $imagegen output; "

View on GitHub (pinned to 5be4028344)

Solutions

  1. For production: regenerate the job with real $imagegen output via record_imagegen_result.py so synthetic_test_source is cleared.
  2. For local tests only: re-run finalize_pet_run.py --allow-synthetic-test-sources (the flag is intentionally hidden).
  3. Audit the manifest to ensure no production job retains synthetic_test_source=true.
Defensive patterns

Strategy: validation

Validate before calling

if job.get('synthetic_test_source') and not allow_synthetic:
    raise RuntimeError(f'job {job["id"]} uses a synthetic source; pass --allow-synthetic-test-sources for local tests only')

Prevention

When it happens

Trigger: job['synthetic_test_source'] is truthy AND finalize_pet_run.py was invoked without --allow-synthetic-test-sources.

Common situations: Running finalize against a manifest generated by a test harness that injects synthetic sources; forgetting to swap test sources for real $imagegen output before a real packaging run.

Related errors


AI-assisted analysis of nexu-io/open-design@5be4028344 (2026-08-12). Data as JSON: /api/errors/8544d08e379e205f. Report an issue: GitHub.