Skip to content

Add VHS timing sync command and optional pipeline integration#19

Merged
jmjava merged 4 commits intomainfrom
cursor/pipeline-correctness-b171
Apr 14, 2026
Merged

Add VHS timing sync command and optional pipeline integration#19
jmjava merged 4 commits intomainfrom
cursor/pipeline-correctness-b171

Conversation

@jmjava
Copy link
Copy Markdown
Owner

@jmjava jmjava commented Apr 14, 2026

Summary

This PR contains the VHS timing sync bundle:

It also includes a follow-up merge-resolution commit after syncing with latest origin/main.

What changed

New command: docgen sync-vhs

Added src/docgen/tape_sync.py and new CLI command:

docgen sync-vhs [--segment 01] [--dry-run]

Behavior:

  • loads animations/timing.json
  • maps each VHS segment/tape to timing data by segment name/id/tape stem
  • parses .tape files for Type -> Enter -> Sleep blocks after the first Show
  • divides timing duration into equal windows per block
  • computes new Sleep using:
    • typing estimate: len(typed_text) * typing_ms_per_char
    • cap: max_typing_sec
    • floor: min_sleep_sec
  • rewrites tape files unless --dry-run is set

Optional pipeline integration after timestamps

Pipeline now optionally runs VHS tape sync immediately after timestamps:

  • enabled when either config is true:
    • pipeline.sync_vhs_after_timestamps
    • vhs.sync_from_timing
  • new CLI flag to suppress mutation on a run:
    • docgen generate-all --skip-tape-sync

Config additions

Added in Config:

  • pipeline.sync_vhs_after_timestamps (default false)
  • vhs.sync_from_timing (default false)
  • vhs.typing_ms_per_char (default 45)
  • vhs.max_typing_sec (default 2.5)
  • vhs.min_sleep_sec (default 0.1)

Scaffolding/docs updates

  • docgen init now writes sync options into generated config.
  • README updated with:
    • docgen sync-vhs command
    • generate-all --skip-tape-sync
    • sync configuration examples
  • docs/demos/docgen.yaml updated with example sync settings.

Merge conflict resolution with latest main

After fetching and merging origin/main, conflicts were found in:

  • README.md
  • docs/demos/docgen.yaml
  • src/docgen/config.py
  • src/docgen/init.py
  • tests/test_config.py

Classification:

  • All were simple content merges (additive docs/config/test changes).
  • No conflicting product intent or incompatible behavioral direction detected.

Resolution approach:

  • preserved both upstream pipeline-correctness docs and sync-vhs docs in README
  • kept upstream defaults plus new sync config accessors in Config
  • retained sync scaffolding in init where appropriate
  • kept extended config assertions in tests

Tests

Added:

  • tests/test_tape_sync.py

Updated:

  • tests/test_config.py for new sync config accessors

Verification

  • python3 -m pytest tests -q --ignore=tests/e2e -> 84 passed
  • python3 -m ruff check src tests -> All checks passed

Issue linkage

Closes #11
Closes #14

Open in Web Open in Cursor 

cursoragent and others added 3 commits April 14, 2026 03:06
… paths

Co-authored-by: John Menke <jmjava@gmail.com>
Co-authored-by: John Menke <jmjava@gmail.com>
Co-authored-by: John Menke <jmjava@gmail.com>
@jmjava jmjava marked this pull request as ready for review April 14, 2026 03:16
Co-authored-by: John Menke <jmjava@gmail.com>
@jmjava jmjava merged commit 57fbe6a into main Apr 14, 2026
7 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

2 participants