affaan-m/ECC · error · ValueError

native snapshot identity mismatch

Error message

native snapshot identity mismatch

What it means

_snapshot verifies the snapshot belongs to the same edit: snapshot['project'] must equal baseline.project_name and snapshot['timeline'] must equal baseline.timeline_name (compared after _text normalization). A mismatch means the native snapshot documents a different project or timeline than the request claims, so insert proposals would be bound to the wrong timeline.

Solutions

  1. Update baseline.project_name/timeline_name to exactly match the snapshot's project/timeline values (including version suffixes like 'Timeline 1 v2').
  2. Re-export the snapshot from the project/timeline the request targets.
  3. If the timeline was renamed, regenerate the request config with the new name.
  4. Whitespace matters only for emptiness — verify exact string equality, including case and spacing.

Example fix

// before
baseline.timeline_name = "main"; snapshot: {"timeline": "main v2"}

// after
baseline.timeline_name = "main v2" (or re-export snapshot for "main")
Defensive patterns

Strategy: validation

Validate before calling

def identity_matches(baseline, snapshot):
    return (snapshot.get("project") == baseline["project_name"]
            and snapshot.get("timeline") == baseline["timeline_name"])

Type guard

def is_bound_snapshot(baseline, snapshot) -> bool:
    return isinstance(snapshot, dict) and snapshot.get("project") == baseline.get("project_name") and snapshot.get("timeline") == baseline.get("timeline_name")

Try / catch

try:
    bundle = build_application_bundle(config, None, local_only=True)
except ValueError as exc:
    if "identity mismatch" in str(exc):
        print("snapshot project/timeline do not match baseline names")
    raise

Prevention

When it happens

Trigger: build_application_bundle where baseline.project_name/timeline_name differ from snapshot's project/timeline strings, or snapshot lacks those keys (get returns None).

Common situations: Renaming a timeline in Resolve after the request was authored; pointing the request at the wrong snapshot file; duplicating a timeline (copy named 'T v2'); a snapshot exported from a different project with the same timeline name pattern.

Understand the failure class

Background: Checksum mismatch errors: "checksum verification failed", "digest mismatch", "expected vs actual checksum" — what they mean and how to fix them — this error's family across 41 libraries.

Related errors


AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16). Data as JSON: /api/errors/0ce151d12cca7ede. Report an issue: GitHub.

Appendix: source

Thrown at skills/taste-application/scripts/tasteforge/integration.py:213

        raise ValueError("native snapshot must be an object")
    settings = snapshot.get("settings")
    native_fps = settings.get("timelineFrameRate") if isinstance(settings, dict) else None
    # Resolve's conventional decimal NTSC labels represent these exact rates.
    ntsc = {"23.976": "24000/1001", "29.97": "30000/1001", "59.94": "60000/1001"}
    try:
        if type(native_fps) not in (str, int, float):
            raise ValueError("native fps missing")
        label = str(native_fps)
        if not re.fullmatch(r"[0-9]{1,9}(?:\.[0-9]{1,12}|/[1-9][0-9]{0,8})?", label):
            raise ValueError("native fps must use a bounded decimal or rational label")
        native_rate = Fraction(ntsc.get(label, label))
        if native_rate != Fraction(*_rate(baseline["fps"])):
            raise ValueError("native fps differs")
    except (ValueError, ZeroDivisionError) as exc:
        raise ValueError("native snapshot fps is missing, invalid or contradictory") from exc
    for cfg, key in [("project_name", "project"), ("timeline_name", "timeline")]:
        if _text(baseline[cfg]) != snapshot.get(key):
            raise ValueError("native snapshot identity mismatch")
    tracks = snapshot.get("timeline_readback")
    if not isinstance(tracks, dict) or not tracks:
        raise ValueError("native clip snapshot required")
    for track, clips in tracks.items():
        if not re.fullmatch(r"(?:video|audio)[1-9][0-9]*", track) or not isinstance(clips, list):
            raise ValueError("invalid native snapshot track")
        for clip in clips:
            _check_clip(clip, bounds)
    return tracks


def _check_clip(clip: Any, bounds: list[int]) -> None:
    required = {"path", "name", "start", "end", "left_offset", "right_offset", "enabled", "properties"}
    if not isinstance(clip, dict) or not required <= clip.keys():
        raise ValueError("native snapshot clip is incomplete")
    _range([clip["start"], clip["end"]], bounds)
    _integer(clip["left_offset"])
    _integer(clip["right_offset"])

View on GitHub (pinned to 8321021c54)