Skip to content

measure_sync: sung slice_audio reference reads as 118.751 s (whole song), confidence 0.171 on a hold_audio shot #990

Closed

Description

@dkackman

Tool/endpoint: measure_sync task (and possibly slice_audio, the reference it reads)

Repro (workspace qa-h3-wangp-probes, lem develop @ 31ab159). Inline task-only workflow, validated, then run_workflow(..., wait_seconds=55), job db3c55bf7089:

{"id": "m-wangp-sync", "steps": [{"name": "p4a_1001", "task": {"command": "measure_sync", "arguments": {
  "audio": "output:probes/wangp-p4-fl2va/20261025-153850-7c27a9b9/final/WanGPProbeFL2VA-shot.2-0.0.mp4",
  "reference": "output:probes/wangp-p4-fl2va/20261025-153850-7c27a9b9/intermediate/WanGPProbeFL2VA-slice.1-0.0.wav",
  "device": "cpu"}}, "result": {"content_type": "application/json"}}]}

The reference is the slice_audio output of job 52195bad071b: asset:song/la-vela.mp3, start_seconds 42.5, num_frames 124, fps 24, sample_rate 44100. That should be about 5.17 s. The same wav was passed to the shot as hold_audio.

Actual:

{"lag_seconds": 0.0, "confidence": 0.171, "audio_seconds": 5.1667, "reference_seconds": 118.751,
 "findings": [{"rule": "sync_low_confidence", "value": 0.171, "threshold": 0.3, ...}]}

Expected: reference_seconds of about 5.17, the length of the slice. Then a held-audio shot measured against its own held track should correlate well above 0.3.

reference_seconds 118.751 looks like the whole song. Either measure_sync resolves the reference to something other than the slice file, or slice_audio wrote the full track. The in-workflow sync step of every sung #988 probe job reports the same 118.751 / ~0.175 (see the #985 results). The spoken arms, whose track is a short wav, report 0.756. Because of this, measure_sync can't judge a sung hold_audio shot, which is what blocks M-F160 / #988.

Filed by tester, claude-opus-5-5 via anthropic.

Activity

  1. added a commit that references this issue on Oct 25, 2026
  2. dkackman commented on Oct 25, 2026

    @dkackman
    OwnerAuthor

    Root cause was in slice_audio, not measure_sync (claude-sonnet-5-5, anthropic). The probe's slice step passes start_seconds + num_frames + fps. With a start in seconds and no duration_seconds, num_frames was ignored and the slice ran to the end of the track. The saved slice.1-0.0.wav in run 20261025-153850-7c27a9b9 is 118.751 s, the whole song. So measure_sync read the file correctly. Its low confidence came from comparing a 5 s shot against a 118 s reference.

    Now: start_seconds with num_frames + fps and no duration gives a slice num_frames/fps long. For 42.5 s, 124 frames at 24 fps that is 5.1667 s. duration_seconds still wins if given. Documented in TASKS.md.

    Not changed: runs that already happened keep their long wav. A sung probe has to be re-run to get a short slice, and measure_sync is untouched.

    Commit f9b96b2 on develop, deployed to lem (healthy).

    Regression case for regression-suite-complete.md: slice_audio with start_seconds plus num_frames/fps must return a slice num_frames/fps long, not the rest of the track.

  3. dkackman commented on Oct 25, 2026

    @dkackman
    OwnerAuthor

    Architecture review queued by the loop driver: this hand-off changed dw/ or dw_mcp/ on develop (31ab1593f1..f9b96b2083: dw/task_domains.py). The reviewer checks it against docs/ARCHITECTURE.md before the tester verifies.

  4. dkackman commented on Oct 25, 2026

    @dkackman
    OwnerAuthor

    Architecture review: pass (reviewer, claude-opus-5-5 via anthropic).

    I read git diff 31ab1593..f9b96b20 under dw/ and dw_mcp/. The only change is in dw/task_domains.py (slice_region). I checked it against docs/ARCHITECTURE.md and stage-c-guardrails item 3:

    • Second owner: none. The fix lives in slice_region, the one helper that both the run (dw/tasks/audio_utils.py) and the preflight (dw/slice_preflight.py) call, so the two stay in agreement. The length comes from the existing frames_to_samples and isn't re-derived.
    • Build vs. buy: nothing is hand-rolled that a dependency already does.
    • Map: no new owner and no rule moved between modules, so no row needed changing.
    • Context: the rationale (measure_sync: sung slice_audio reference reads as 118.751 s (whole song), confidence 0.171 on a hold_audio shot #990) is in the slice_region docstring and an inline comment. No CLAUDE.md was touched.

    Nothing was waived. This goes to the tester for verification.

  5. dkackman commented on Oct 25, 2026

    @dkackman
    OwnerAuthor

    Verified on lem develop @ 05e2f4d (tester, claude-opus-5-5 via anthropic).

    I ran one task-only workflow in workspace qa-h3-wangp-probes. It was validated first, then run as job 05cece776d19 (run v990-slice-sync/20261025-164259-3b2a9797):

    1. The issue's slice (slice_a): slice_audio on asset:song/la-vela.mp3 with start_seconds 42.5, num_frames 124, fps 24 and sample_rate 44100.
    2. The issue's repro (sync_old_shot): measure_sync, with audio set to the original sung hold_audio shot output:probes/wangp-p4-fl2va/20261025-153850-7c27a9b9/final/WanGPProbeFL2VA-shot.2-0.0.mp4, reference set to previous_result:slice_a, and device cpu.
      → reference_seconds 5.1667 (was 118.751), audio_seconds 5.1667, lag_seconds 0.0, confidence 0.979 (was 0.171), findings [].
    3. Adjacent: duration_seconds still wins (slice_c): the same slice plus duration_seconds 3.0. I measured it with measure_sync(audio=slice_c, reference=slice_a).
      → audio_seconds 3.0, reference_seconds 5.1667, confidence 0.874, lag 0.0. Duration takes precedence over num_frames/fps.

    Both parts of expected: hold. The slice is about 5.17 s, and the held-audio shot correlates against its own track well above 0.3. I didn't re-run step 1 with the old wav: per the hand-off, runs that already happened keep their 118 s file.

  6. added
    status:verifiedTester confirmed the fix via a real MCP call
    and removed on Oct 25, 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