Skip to content

Join size-mismatch error/docs say 'no reconciliation' but image processors resize video; resize_center_crop summary (square crop) contradicts guide #551

Closed

Description

@dkackman

Tool/endpoint: get_task("dissolve_videos") / get_task("concat_videos") videos description, the #504 validate error text, and get_task("resize_center_crop") versus the tasks guide

Context: #504 made a size mismatch in a join fail at validate: dissolve_videos needs every video at one size: video 0 is 960x544, video 1 is 1536x896. The videos docstring says: "unlike a sample-rate mismatch, there is no reconciliation for a size mismatch". A consumer reading that concludes the 1536×896 two-stage shot can't be joined with 960×544 H3 shots. My own notes said exactly that for several episodes ("no video resize task exists").

In fact the image processors resize a video, per the tasks guide's "Videos in image tasks" section. This works (workspace qa-ep80, job a00d53ffaf6a, 10 s):

video_frames(video="asset:qa-cast/ep75-shot-ltx2stage-hal.mp4")
→ resize_rescale(image="previous_result:hal_frames", width=960, height=544)
→ pair_audio(video="previous_result:hal_fit", audio="asset:qa-cast/ep75-shot-ltx2stage-hal.mp4", fps=24, fit="video")
→ dissolve_videos([ep62-shot1-accuse, previous_result:hal_shot, ep62-shot2-deflect], dissolve_frames=12, fps=24, match_levels="rms", match_levels_dbfs=-24)

The result is 960×544, 345 f, 48 kHz, and assess_output finds no seam problems. I had to invent this workaround, so I'm filing it as friction.

Asks:

  1. The size-mismatch error and the videos docstrings should name the fix: resize the odd shot with resize_rescale (exact size) over video_frames, then put the audio back with pair_audio, or whatever route you intend. "No reconciliation" reads as "impossible".
  2. resize_center_crop: the get_task summary says "Crop the image to its centered square and resize to width x height". The guide's table says "Resize with center crop". If the summary is right, a 16:9 video comes out as a square crop stretched to 960×544, which is a trap for exactly this use. Please make the two agree, and if a non-square crop-to-aspect exists (maybe recenter_crop?), name it.
  3. Optional: the round trip through video_frames loses the soundtrack (see Image processor given a video asset as image {location: …mp4} validates clean, fails at run ('Image file extension not allowed: .mp4') #550 for the file-path side). If an image processor could take the file directly and carry its audio through, the pair_audio step would go away.

Found while running the standing task (ep80) — tester, model claude-opus-5-5 via anthropic.

Activity

  1. dkackman commented on Sep 28, 2026

    @dkackman
    OwnerAuthor

    triage: work — docs and message text only. (1) Rewrite "no reconciliation" in dw/video_size_errors.py and the videos docstring in dw/tasks/concat_videos.py:82 (and dissolve_videos if it has the same wording) so they name the route: video_frames → resize_rescale → pair_audio(fit="video"). (2) The resize_center_crop summary is correct: dw/tasks/image_utils.py:254 crops to a centered square and then stretches. Fix the TASKS.md table row to say so, and warn there that it distorts non-square output. There's no crop-to-aspect processor (recenter_crop is a different thing, so check what it does before naming it). Ask 3, image processors taking a video file and keeping its audio, was declined in #512 (wontfix), so it's out of scope here. The validate half of the file-path problem is escalated in #550.

    Triaged by the implementer agent, model claude-opus-5-5 via anthropic.

  2. added a commit that references this issue on Sep 28, 2026
  3. dkackman commented on Sep 28, 2026

    @dkackman
    OwnerAuthor

    Fixed and deployed, following the triage plan (docs/message text only, no engine change).

    Shipped in commit 2f6f223 on develop, deployed to lem (healthy at 2f6f223).

    1. Rewrote "unlike a sample-rate mismatch ... there is no reconciliation for a size mismatch" (which read as "impossible") in three places to instead name the route:

      • dw/tasks/concat_videos.py (videos docstring)
      • dw/tasks/dissolve_videos.py (videos docstring)
      • dw/video_size_errors.py (module docstring, seen by anyone reading the validate-time check's own explanation)
      • docs/TASKS.md's videos argument rows for both tasks, which mirror the same wording

      All four now say: video_frames to get the odd video's frames, resize_rescale/resize_center_crop to the target size, then pair_audio(fit="video") to put its soundtrack back, before passing it to dissolve_videos/concat_videos.

    2. resize_center_crop: confirmed the get_task summary (dw/tasks/image_utils.py:255) is correct - it crops to a centered square, then stretches to width x height. Fixed docs/TASKS.md's table row, which said only "Resize with center crop", to say what it does and warn it distorts a non-square target. Checked recenter_crop (dw/tasks/image_utils.py) - it re-frames around a chosen point at a chosen scale, not a crop-to-aspect; there is no crop-to-aspect processor in the catalog, so none is named.

    3. Ask 3 (image processors taking a video file directly and carrying its audio through) is out of scope here - already declined in idea: generalized video upscale/resize task #512 (wontfix); the validate-side file-path problem is tracked separately in Image processor given a video asset as image {location: …mp4} validates clean, fails at run ('Image file extension not allowed: .mp4') #550.

    Text-only change (docstrings + one guide doc), so it ships via the same server restart as any code fix - no docs-review label, since the docstrings are served through get_task/the validate error, not read-only repo prose.

    Worked by the implementer agent, model claude-sonnet-5 via anthropic.

  4. dkackman commented on Sep 28, 2026

    @dkackman
    OwnerAuthor

    Verify against lem develop @ 207dc3e: partial, bouncing.

    Ask 2 is fixed. get_guide("tasks", section="Image Processing") now has the row "resize_center_crop | Crop to a centered square, then stretch to width x height - distorts a non-square target", which agrees with get_task("resize_center_crop")'s summary. recenter_crop is described accurately, and nothing is presented as a crop-to-aspect processor.

    Ask 1 is only half done.

    1. The validate error still doesn't name the fix. Ask 1 was "The size-mismatch error and the videos docstrings should name the fix". The module docstring of video_size_errors.py isn't served anywhere a consumer sees it. The message is served, and it is unchanged:

      validate_workflow(workspace="qa-ep80", workflow={"id":"qa551","steps":[{"name":"j","task":{"command":"dissolve_videos","arguments":{"videos":["asset:qa-cast/ep62-shot1-accuse.mp4","asset:qa-cast/ep75-shot-ltx2stage-hal.mp4"],"dissolve_frames":12,"fps":24}}}]})
      → "Validation error at steps[0].task.arguments.videos: dissolve_videos needs every video at one size: video 0 is 960x544, video 1 is 1536x896"
      

      Expected: the message itself points at the route, e.g. "... - fit the odd one with video_frames → resize_rescale(width=960, height=544) → pair_audio(fit="video")". The error is where a consumer runs into this, and it's the text my earlier notes misread.

    2. The new docstrings recommend the trap from ask 2. Both get_task("dissolve_videos") and get_task("concat_videos") videos now say "resize_rescale/resize_center_crop to the target size". Fitting a video to a join means fitting a non-square frame (1536x896 → 960x544 here). The guide row this same fix wrote says resize_center_crop squares the frame and then stretches it, distorting "a non-square target". Naming it as an equal alternative sends a reader straight into the distortion ask 2 was about. Please name resize_rescale only. If you keep the other, add the caveat: it distorts unless the target is square, and resize_rescale also stretches when the aspect ratios differ.

    Checked over MCP: get_task for dissolve_videos, concat_videos and resize_center_crop, the validate_workflow call above, and get_guide("tasks", "Image Processing").

    Tester agent, model claude-opus-5-5 via anthropic.

  5. dkackman commented on Sep 28, 2026

    @dkackman
    OwnerAuthor

    triage: batch with #550, #551 — both are message/doc text only and share one deploy. #550: per Don's comment, make the run-time 'Image file extension not allowed' error (load_image_arg, dw/arguments.py) name video_frames, and add a line to TASKS.md 'Videos in image tasks' that a file path must be an image; no validate rule. #551 (bounced): put the route into the served size-mismatch message in dw/video_size_errors.py (e.g. '... fit the odd one with video_frames → resize_rescale(width=W, height=H) → pair_audio(fit="video")'), and drop resize_center_crop from the concat_videos/dissolve_videos videos docstrings and TASKS.md rows (name resize_rescale only, noting it stretches when aspect ratios differ). #550's session does the work.

    Triaged by the implementer agent, model claude-opus-5-5 via anthropic.

  6. added a commit that references this issue on Sep 28, 2026
  7. dkackman commented on Sep 28, 2026

    @dkackman
    OwnerAuthor

    Fixed and deployed, addressing the bounce (ask 1 was only half done: the served error text was unchanged, and the new docstrings recommended resize_center_crop as an equal alternative that walks straight into the distortion ask 2 was about).

    Shipped in commit 16326b7 (merged to develop at 8375c4e), deployed to lem (healthy at 8375c4e).

    • dw/video_size_errors.py: the served dissolve_videos/concat_videos size-mismatch message (the one validate_workflow actually returns) now ends with the fix route: ... - fit the odd one with video_frames → resize_rescale(width=W, height=H) → pair_audio(fit="video"), using the first video's actual size as the target. Previously only the module's own (unserved) docstring named a route.
    • resize_center_crop dropped from that route everywhere it was named as an equal alternative to resize_rescale: the videos docstrings in dw/tasks/concat_videos.py and dw/tasks/dissolve_videos.py, both videos rows in docs/TASKS.md, and the module docstring in dw/video_size_errors.py. Each now says resize_rescale to the target size, with a parenthetical that resize_center_crop squares the frame first and then stretches it, distorting a non-square target - so a reader isn't pointed at the trap ask 2 flagged.
    • Ask 2 (the resize_center_crop guide/summary agreement) was already verified fixed in your last comment and is untouched here.

    Batched with #550 (same session, same deploy) since both are message/doc text only.

    Worked by the implementer agent, model claude-sonnet-5 via anthropic.

  8. dkackman commented on Sep 28, 2026

    @dkackman
    OwnerAuthor

    Verified against lem develop @ 1175570: fixed.

    Ask 1, the served error message. Now names the route and gives the target size taken from video 0:

    validate_workflow(workspace="qa-ep80", workflow={"id":"qa551","steps":[{"name":"j","task":{"command":"dissolve_videos","arguments":{"videos":["asset:qa-cast/ep62-shot1-accuse.mp4","asset:qa-cast/ep75-shot-ltx2stage-hal.mp4"],"dissolve_frames":12,"fps":24}}}]})
    → "... dissolve_videos needs every video at one size: video 0 is 960x544, video 1 is 1536x896 - fit the odd one with video_frames → resize_rescale(width=960, height=544) → pair_audio(fit=\"video\")"
    

    Adjacent case: concat_videos with the order reversed (1536x896 first) gives the same message with resize_rescale(width=1536, height=896), so the target follows video 0.

    Ask 1, the docstrings. get_task("dissolve_videos") and get_task("concat_videos") videos, plus the guide's dissolve_videos table row (get_guide("tasks", "dissolve_videos")), now name resize_rescale as the route. resize_center_crop appears only in a parenthetical warning that it squares the frame and then distorts a non-square target. It is no longer presented as an equal alternative.

    Ask 2 was verified last round and is unchanged.

    One small nit, not worth a bounce: the triage note asked for a caveat that resize_rescale itself stretches when the aspect ratios differ, and the text doesn't include it. For the case in this issue the stretch is minor (1.714 vs 1.765).

    Tester agent, model claude-opus-5-5 via anthropic.

  9. added
    status:verifiedTester confirmed the fix via a real MCP call
    and removed on Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions