calesthio/OpenMontage · error · CheckpointValidationError
PREREQUISITE VIOLATION: stage {stage!r} cannot advance; {det
Error message
PREREQUISITE VIOLATION: stage {stage!r} cannot advance; {details}. Pipeline order: {stages}. What it means
_validate_optional_parameters checks callback_url when present and requires it to start with https:// or http://. Ark calls this URL when the async video task completes; anything else (asset:// , data:, ftp:, bare hostnames) is rejected before submission.
Source
Thrown at lib/checkpoint.py:342
or checkpoint.get("stage") != predecessor
):
incomplete.append(predecessor)
continue
if checkpoint.get("status") != "completed":
incomplete.append(predecessor)
continue
if _stage_requires_approval(pipeline_type, predecessor) and not checkpoint.get(
"human_approved"
):
unapproved.append(predecessor)
if incomplete or unapproved:
details = []
if incomplete:
details.append(f"incomplete or missing: {incomplete}")
if unapproved:
details.append(f"completed without required approval: {unapproved}")
raise CheckpointValidationError(
f"PREREQUISITE VIOLATION: stage {stage!r} cannot advance; "
+ "; ".join(details)
+ f". Pipeline order: {stages}."
)
def _archive_superseded_checkpoint(path: Path, stage: str) -> None:
"""Copy an existing checkpoint into history/ before it is overwritten.
Preserves the full run record: stage re-runs (script v1 → v2) and gate
transitions (awaiting_human → completed) remain reconstructable. Repeated
in_progress refreshes are NOT archived — they are partial-progress
heartbeats, not versions.
Archiving is best-effort and must never crash a checkpoint write: the
Backlot watcher may hold the file open (Windows denies renames of open
files), so we copy rather than move, and swallow archival I/O failures.
"""View on GitHub (pinned to 95e1c3d0ab)
Solutions
- Include the scheme: http://localhost:9000/hook locally or https://your-host/webhook in production.
- Strip quotes/whitespace from env-provided callback URLs.
- Omit callback_url entirely if you poll for completion instead.
Example fix
# before
payload = {"callback_url": "events.example.com/hook"}
# after
payload = {"callback_url": "https://events.example.com/hook"} Defensive patterns
Strategy: validation
Validate before calling
def callback_ok(url) -> bool:
return url is None or str(url).startswith(("http://", "https://")) Type guard
def is_http_url(v) -> bool:
return str(v).startswith(("http://", "https://")) Try / catch
try:
tool.run(inputs)
except ValueError as e:
if "callback_url" in str(e):
payload["callback_url"] = "https://" + payload["callback_url"].lstrip("/")
tool.run(inputs)
else:
raise Prevention
- Normalize webhook URLs (add scheme, strip whitespace) when loading config.
- For local dev use http://localhost:PORT — the scheme is what matters, not reachability.
When it happens
Trigger: callback_url="events.example.com/hook", callback_url="asset://cb", callback_url="file:///tmp/hook" in the optional parameters.
Common situations: Config templates omitting the scheme; local dev with localhost used without http://; webhook URLs loaded from env vars that include quotes or whitespace.
Related errors
- Unknown pipeline_type {pipeline_type!r} — cannot resolve gat
- ${res.status} ${url}
- fetch failed ${r.status}: ${url}
- path escapes project
- media not found
AI-assisted analysis of calesthio/OpenMontage@95e1c3d0ab (2026-08-15).
Data as JSON: /api/errors/4316ee2b003ccb05.
Report an issue: GitHub.