You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
assemble-and-score / dissolve-between-shots: a score longer than the cut is still trimmed silently (#246 only fixed pair_audio fit:"video") #342
repro: templates/assemble-and-score with 12 H3 shots (each 17n+5 frames, so a 12-shot total is ≡ 9 mod 17; the reachable totals near the score are 4089/4106/4123/4140). Use total_frames: 4089 (170.375 s @ 24 fps), score_start_frame: 0, and score a 172.74 s wav whose last seconds are loud: the loudest second in the file, +0.56 dBFS peak, is at 171 s.
expected: A warning that the score runs N s past the cut and its tail was dropped, symmetric with the existing slice_past_end warning for the short-score direction and with #246's audio_trimmed_to_video.
actual:succeeded, no warning. The last 2.37 s of the song, including its loudest second, are dropped. The template description documents the padding direction ("a score that does not reach that far is padded…") and says nothing about this one.
code:
workflows/templates/assemble-and-score.json step soundtrack (lines ~61-71): slice_audio(audio=score, start_frame=score_start_frame, num_frames=total_frames, fps), which trims by construction.
dw/tasks/audio_utils.py:502/641 _warn_on_slice_past_end: only the past-end (padding) direction warns.
proposed fix: slice_audio is a slice, so warning on every unused remainder would fire on legitimate excerpts. Prefer one of these:
(a) In the two templates, pass slice_audio a new optional warn_unused_tail_seconds-style argument (default off in the task, on in the templates). It warns with the seconds dropped and the peak dBFS of the dropped region when the remainder after the slice is non-silent.
(b) Emit the warning in slice_audio only when the unused tail is short relative to the slice (e.g. < 10 s or < 5%) and non-silent. That is the "the cut almost reached the score's end" signature of a frame-lattice miss.
Also add the longer-score direction to both template descriptions (the total_frames lattice means an exact match is often unreachable; move score_start_frame or re-end the score with fade_audio).
source: dw-findings-ledger DW-06 (T#9b), triaged 2026-09-22 against develop f11ac2a. Reopens the scope of #246.
Filed from Don's dw findings ledger (dw-findings-ledger.html, DW-06). First-pass triage for applicability and value against open/closed issues and develop @ f11ac2a by claude-opus-5-5 via anthropic (interactive session with Don; code-checking subagents inherited that model).
triage: batch with #339, #342 — same two templates (assemble-and-score, dissolve-between-shots) on the score/world path; one branch, one deploy. For #342 prefer a warning inside slice_audio with no new task argument; if a new argument turns out necessary, park that part for approval rather than adding it. (claude-opus-5-5 via anthropic, triage session)
Fixed on develop, deployed to lem, same branch/deploy as #339.
Per the triage note, this is implemented as a warning inside `slice_audio` with no new task argument. Added `_warn_on_slice_trims_tail` to `dw/tasks/audio_utils.py`, called right after the existing `_warn_on_slice_past_end` check. It only fires for the narrow "almost reached the end" signature: the dropped tail must be short in absolute terms (< `SLICE_TRIM_WARN_SECONDS` = 10s) and short relative to the slice itself (< `SLICE_TRIM_WARN_FRACTION` = 5% of the slice length), and the dropped region must be non-silent (checked via `level_dbfs(..., "peak")` returning a real value). A deliberate short excerpt out of a long recording (e.g. 1s slice out of a 60s source, 57s remainder) correctly does not warn, since the absolute-seconds gate fails. When it does fire, it emits `kind="slice_trimmed_tail"` with `source_seconds`, `dropped_seconds`, `dropped_peak_dbfs`, and `sample_rate`, following the same `emit_warning` pattern as the existing pad/trim warnings in `pair_audio.py`.
Commit: `d591404` (on `develop`, merged from `fix/339-342-world-fade-slice-trim`)
Deploy: `ssh lem 'scripts/deploy.sh develop'`, healthy at `d591404`, 2026-09-22 22:24 UTC
Worked as: Claude Sonnet 5 (claude-sonnet-5), provider Anthropic
Proposed regression case (for the tester to add once verified over MCP) — `regression-suite-complete.md` (edge-case, not fundamental-path): call `slice_audio` (directly, or via `assemble-and-score`/`dissolve-between-shots` with `total_frames` set a few hundred ms short of the score's actual length, on a non-silent tail) and expect a `slice_trimmed_tail` warning in the job's `warnings`. Pair it with a negative case — a short slice out of a much longer source — expecting no such warning, to pin the "deliberate excerpt" exclusion.
Verified over MCP against lem develop @ e5bfb9e. Verified as claude-opus-5-5 via anthropic (tester, VERIFY session).
The score is asset:qa-cast/ep11-bed.wav (19.67 s, 32 kHz mono, non-silent throughout). All runs were in workspace regression-complete, and their outputs were deleted afterwards.
Direct slice_audio, as an inline 3-step workflow (job 1a06544c0760, succeeded):
near_end: start_frame: 0, num_frames: 460, fps: 24 (19.17 s, 0.50 s tail, 2.6 %). Warns:near_end: slice_audio: the slice ends 0.50 s before the 19.67 s source does, dropping its tail (peak -50.2 dBFS in the dropped 0.50 s) - ...
excerpt: num_frames: 24 (1 s slice, 18.67 s tail). No warning, as expected: the absolute gate is not met.
half: duration_seconds: 10 (9.67 s tail: under 10 s but 97 % of the slice). No warning, as expected: the fraction gate is not met.
The issue's template path, templates/assemble-and-score (job 61ea679c3904, succeeded):
Activity
dkackman commentedon Sep 22, 2026
Related: #339 touches the same two templates on the score/world path. Natural batch. (claude-opus-5-5 via anthropic, filing session)
dkackman commentedon Sep 22, 2026
triage: batch with #339, #342 — same two templates (assemble-and-score, dissolve-between-shots) on the score/world path; one branch, one deploy. For #342 prefer a warning inside slice_audio with no new task argument; if a new argument turns out necessary, park that part for approval rather than adding it. (claude-opus-5-5 via anthropic, triage session)
fix(audio): #339, #342 - world_fade_out_ms and slice_audio tail warning
dkackman commentedon Sep 22, 2026
Fixed on develop, deployed to lem, same branch/deploy as #339.
Per the triage note, this is implemented as a warning inside `slice_audio` with no new task argument. Added `_warn_on_slice_trims_tail` to `dw/tasks/audio_utils.py`, called right after the existing `_warn_on_slice_past_end` check. It only fires for the narrow "almost reached the end" signature: the dropped tail must be short in absolute terms (< `SLICE_TRIM_WARN_SECONDS` = 10s) and short relative to the slice itself (< `SLICE_TRIM_WARN_FRACTION` = 5% of the slice length), and the dropped region must be non-silent (checked via `level_dbfs(..., "peak")` returning a real value). A deliberate short excerpt out of a long recording (e.g. 1s slice out of a 60s source, 57s remainder) correctly does not warn, since the absolute-seconds gate fails. When it does fire, it emits `kind="slice_trimmed_tail"` with `source_seconds`, `dropped_seconds`, `dropped_peak_dbfs`, and `sample_rate`, following the same `emit_warning` pattern as the existing pad/trim warnings in `pair_audio.py`.
Proposed regression case (for the tester to add once verified over MCP) — `regression-suite-complete.md` (edge-case, not fundamental-path): call `slice_audio` (directly, or via `assemble-and-score`/`dissolve-between-shots` with `total_frames` set a few hundred ms short of the score's actual length, on a non-silent tail) and expect a `slice_trimmed_tail` warning in the job's `warnings`. Pair it with a negative case — a short slice out of a much longer source — expecting no such warning, to pin the "deliberate excerpt" exclusion.
dkackman commentedon Sep 23, 2026
Verified over MCP against lem
develop@ e5bfb9e. Verified as claude-opus-5-5 via anthropic (tester, VERIFY session).The score is
asset:qa-cast/ep11-bed.wav(19.67 s, 32 kHz mono, non-silent throughout). All runs were in workspaceregression-complete, and their outputs were deleted afterwards.slice_audio, as an inline 3-step workflow (job1a06544c0760, succeeded):near_end:start_frame: 0, num_frames: 460, fps: 24(19.17 s, 0.50 s tail, 2.6 %). Warns:near_end: slice_audio: the slice ends 0.50 s before the 19.67 s source does, dropping its tail (peak -50.2 dBFS in the dropped 0.50 s) - ...excerpt:num_frames: 24(1 s slice, 18.67 s tail). No warning, as expected: the absolute gate is not met.half:duration_seconds: 10(9.67 s tail: under 10 s but 97 % of the slice). No warning, as expected: the fraction gate is not met.templates/assemble-and-score(job61ea679c3904, succeeded):qa-cast/ep28-shot1-wide.mp4+qa-cast/ep28-shot2-close.mp4(124 + 124 frames),total_frames: 248,score_start_frame: 214,sample_rate: 32000.soundtrack:the slice ends 0.42 s before the 19.67 s source does, dropping its tail (peak -53.5 dBFS in the dropped 0.42 s).This matches
expected:. The warning names the seconds dropped and the peak of the dropped region, and deliberate excerpts stay quiet.Not exercised:
dissolve-between-shots. It uses the sameslice_audiostep, so the change covers it, but I didn't run it separately.expected:didn't require it, and it's still worth adding.