nexu-io/open-design · error · SystemExit

unknown row job id: {state}

Error message

unknown row job id: {state}

What it means

Raised at the end of queue_repair() in queue_pet_repairs.py when no job in imagegen-jobs.json has id == state. The review asked to repair a row whose id is not present in the manifest, so the repair cannot be queued. Rows in the review that lack a matching job are silently skipped in rows_to_repair only if they fail the dict/state check; an unknown but well-formed state reaches here.

Source

Thrown at skills/hatch-pet/scripts/queue_pet_repairs.py:137

            )
        for key in [
            "source_path",
            "source_provenance",
            "source_sha256",
            "output_sha256",
            "completed_at",
            "metadata",
            "synthetic_test_source",
            "secondary_fallback",
            "derived_from",
            "mirror_decision",
        ]:
            job.pop(key, None)
        result: dict[str, object] = {"attempt": attempt}
        if archived_output is not None:
            result["archived_output"] = archived_output
        return result
    raise SystemExit(f"unknown row job id: {state}")


def main() -> None:
    parser = argparse.ArgumentParser(description=__doc__)
    parser.add_argument("--run-dir", required=True)
    parser.add_argument("--review", default="")
    parser.add_argument("--repair-on-warnings", action="store_true")
    args = parser.parse_args()

    run_dir = Path(args.run_dir).expanduser().resolve()
    review_path = (
        Path(args.review).expanduser().resolve()
        if args.review
        else run_dir / "qa" / "review.json"
    )
    manifest_path = run_dir / "imagegen-jobs.json"
    review = load_json(review_path)
    manifest = load_json(manifest_path)

View on GitHub (pinned to 5be4028344)

Solutions

  1. List the valid state ids: jq '.jobs[].id' run_dir/imagegen-jobs.json.
  2. Edit review.json so each rows[].state matches an existing job id, or drop the stale row.
  3. If the manifest is the stale one, re-run prepare_pet_run.py --force with the intended row set and regenerate the review.
  4. Confirm --run-dir points at the same run that produced the review.

Example fix

# before: review has {"state": "attack-2"} but manifest only has "attack"
# after:  edit review.json state to "attack" (or add the 'attack-2' job to the manifest)
Defensive patterns

Strategy: validation

Validate before calling

valid_ids = {j.get("id") for j in job_list(manifest)}
unknown = [r["state"] for r in repairs if r["state"] not in valid_ids]
if unknown:
    raise SystemExit(f"review references unknown row states: {unknown}")

Prevention

When it happens

Trigger: The QA review references a state id (e.g. 'attack-2') that was never defined in the manifest; the manifest was regenerated with a different row set after the review; state id was renamed (e.g. 'walk' -> 'walk-cycle') but the review still uses the old name.

Common situations: Iterating on the row set between generate and repair; two run_dirs mixed up; copy-paste of a review from a different pet whose rows differ.

Related errors


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