Skip to content

recording: drive all tutorial recordings in content-time (lockstep follow-up)#193

Merged
borisbat merged 2 commits into
masterfrom
bbatkin/recording-drivers-content-time
Jun 7, 2026
Merged

recording: drive all tutorial recordings in content-time (lockstep follow-up)#193
borisbat merged 2 commits into
masterfrom
bbatkin/recording-drivers-content-time

Conversation

@borisbat

@borisbat borisbat commented Jun 7, 2026

Copy link
Copy Markdown
Owner

Follow-up to #191 (content-time helpers). Refactors all 47 tests/integration/record_*.das drivers off wall-clock sleep() pacing and onto the shared content-time helpers, then re-records every tutorial video.

Why

Under with_recording_app the host runs a fixed-dt clock — every captured frame is exactly 1/fps of video. A wall-clock sleep(ms) therefore stretches a beat by the render/playback fps ratio and varies with per-beat render load, so beats land unevenly and the playback judders. #191 added the content-time helpers (hold_content, record_frame_count, hold_remainder_content, *_voice action helpers) and moved the voice helpers over; this PR moves the remaining inline dwell/settle/warmup pacing in the drivers themselves.

What changed

  • Pure settle/warmup/dwell driverssleep(...)hold_content(app, ...) (gates on captured-frame count, falls back to wall-clock when not recording).
  • Lead + remainder beats — restructured to anchor on record_frame_count(app), hold a short lead, run the action + checks, then hold_remainder_content(app, dwell, anchor) pads the beat to the voice dwell measuring consumed frames (dropped the old magic +Nu fudge constants).
  • Centralized repeated patterns into *_voice helpers (e.g. sort_under_voice, context_pick_voice, open_under_voice/pick_under_voice, type_field_voice, expand_under_voice, drag_under_voice) so prepare_recording can still AST-scan the literal say lines at each call site.
  • record_child / record_with_tab_stop / record_with_disabled — converted the remaining ref_time_ticks-based anchors to record_frame_count, and the special max(hold, body) dwell in with_disabled stage 4 to lead + hold_remainder_content.
  • Re-recorded all 47 tutorial .mp4s on the content-time drivers (verified 47/47 play, correct durations, no dropped frames / overruns).
  • record_group.das — dropped an unused require math (lint STYLE030).

move_to is already non-blocking (posts a lerped timeline consumed under the lockstep clock during the following hold), so only bare sleep() was a wall-clock leak.

Verification

  • Compile 47/47, MCP lint clean (0 issues), formatter --verify clean (47 files) — all via the pre-push hook.
  • Full re-record: 47/47 ok, 0 dropped, 0 overruns.
  • Videos eyeballed and approved.

🤖 Generated with Claude Code

borisbat and others added 2 commits June 7, 2026 08:49
…-up)

Refactor all 47 integration recording drivers off wall-clock sleep() onto the
content-time helpers from #191 (hold_content / record_frame_count /
hold_remainder_content). Under a lockstep recording session every captured
frame is exactly 1/fps of video, so wall-clock sleeps stretched each beat by
the record/playback fps ratio and varied with per-beat render load -- the
source of the uneven pacing. The lead/remainder beats now measure consumed
frames instead of guessing with magic glide constants.

Re-recorded all 47 tutorial mp4s with the content-time drivers: every driver
records 0 dropped frames with no max_seconds overrun (the two former overruns,
color_button_hover and flat_tooltips, are fixed).

Also drop an unused require math in record_group.das (CI lints PR-touched files).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…l videos

Self-contained per-repo runner: Clean -> Prepare (TTS) -> Record -> Convert
for every tests/integration/record_*.das driver. Run one repo at a time;
defaults re-record the whole repo. Computes its own repo root from
$PSScriptRoot and picks up $env:DASLANG, so it is not path-hardcoded.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@borisbat borisbat merged commit 58e0ce4 into master Jun 7, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant