feat: release 1.5.7 - per-clip workflows, runtime budgets, media-path guards

Three reported issues:

#66: the Video stage workflow picker was keyed by scene id, so choosing a
workflow for one clip overwrote every sibling clip. It is now keyed by clip
id, hydrates each clip's persisted choice, autosaves both
clips.workflow_id and form_workflow_id, and Generate One / Generate All
resolve the workflow per clip (a scene can mix image->video and
video->video extend across its clips).

#64: a 30-second ask could produce a 1:51 script - prompts carried no
per-scene scale and the duration rescale could only grow. Prompts now
state the total seconds and a per-scene budget, and the rescale may shrink
(floor 0.5) so over-written boards pull toward the target; content itself
is never edited.

#67: a hand-written directory path (e.g. ComfyUI's input dir) reached
ComfyUI and died as an opaque Errno 21. prepare_media_inputs now rejects
directory / missing local files before queueing with a node-naming error,
and the agent's run_workflow validates media input_values at call time.
Bare Comfy-side names pass untouched.

534 backend tests pass; svelte-check clean.
This commit is contained in:
Benjiyaya
2026-09-24 02:26:47 +08:00
parent 7551ba9d88
commit d2240b9c5a
12 changed files with 453 additions and 43 deletions
@@ -0,0 +1,62 @@
# Calliope 1.5.7 — per-clip workflows, runtime budgets, media-path guards
Three reported issues fixed — [#66](https://github.com/benjiyaya/Calliope/issues/66)
(picking a workflow for one clip changed every clip in the scene),
[#64](https://github.com/benjiyaya/Calliope/issues/64) (scripts ignored the
story's target length), and
[#67](https://github.com/benjiyaya/Calliope/issues/67) (a directory path
passed as a video input crashed ComfyUI with `Errno 21`).
## #66 — Workflow choice is per clip
The Video stage's workflow picker was keyed by scene id, so choosing a
workflow for one clip silently overwrote every sibling clip of the same
scene — a scene set up as image→video on clip 1 + video→video extend on
clip 2 could never be enqueued as designed.
- The picker is now keyed by **clip id**, and opening a clip hydrates its
own persisted choice (`clips.workflow_id`, then `form_workflow_id`).
- The debounced autosave persists both `clips.workflow_id` and
`form_workflow_id`, so the choice survives restarts.
- **Generate One** and batch **Generate All** each resolve the workflow per
clip: session pick → clip row → saved form choice → scene default → first
enabled. A mixed-workflow scene now renders each clip with its own
workflow.
## #64 — Target runtime is a budget, not a floor
Asking for a 30-second film could produce a 1:51 script: prompts carried no
per-scene scale, and the duration rescale could only grow
(`max(target/total, 1.0)`), never shrink.
- Script prompts (single-call and chunked) now state the **total seconds**
and a concrete **per-scene budget** (`Per-scene budget: ~Ns each — write
action length and dialogue VOLUME to this scale`), so content volume is
written to the runtime instead of discovered after.
- The final rescale may now go **below 1.0** (floor 0.5): an over-written
board's scene budgets shrink toward the target. Content is never edited —
long scenes remain correct; clips are where they get cut.
## #67 — Media inputs that are directories fail fast
When the agent hand-wrote a path into a media input slot it could pass
ComfyUI's input *directory*; that value reached ComfyUI and died with the
opaque `ValueError: [Errno 21] Is a directory`.
- `prepare_media_inputs` now rejects a media input whose local-looking value
is a directory or nonexistent file **before queueing**, failing with
`node N (class): field value '...' is a directory` / `file not found
locally` — with the node id and actionable guidance. Bare names (no path
separators) are legitimate Comfy-side references and pass untouched.
- The agent's `run_workflow` mirrors the guard at **call time**: an
`input_values[<media node>]` value that resolves to a dir/missing file
fails the tool call with correction guidance instead of creating a doomed
job.
## Testing
- `tests/test_script_chunking.py` — per-scene budget present in both prompt
builders; oversized-script durations shrink toward the target.
- `tests/test_video_continue.py` — directory and missing-file rejection,
bare-name passthrough, existing-file upload still works.
- Full backend suite: 534 passed; `svelte-check`: 0 errors.
+1
View File
@@ -2,6 +2,7 @@
Dated notes for GitHub releases. Newest first.
- [2026-09-24 clip workflow + runtime budget](./2026-09-24-clip-workflow-runtime-budget.md) — workflow per clip (not per scene); target runtime is a budget that can shrink; media inputs that are directories fail fast with a node-naming error (1.5.7)
- [2026-09-22 project name alias patch](./2026-09-22-project-name-alias.md) — `name` accepted for a project's title on the REST API and agent tools; fixes storyline builds dead-ending on a 422 (1.5.6)
- [2026-09-22 swarm render/scene fixes](./2026-09-22-swarm-render-scene-fixes.md) — video-role render tools reachable (ask_user recovery); story role gains scene tools; deep-link sessions no longer orphan; canvas auto-seeds new entities (1.5.5)
- [2026-09-19 steering + Asset Library + hardening](./2026-09-19-steering-library-hardening.md) — mid-run steering; Asset Library page (filter + lazy loading); canvas delete that deletes; agent-loop hardening batch; Build Scene Brief/Cut gates (1.5.4)