Skip to content

feat(demo-function): address GitHub issue #47 (Playwright test mode, VHS, caching)#48

Merged
jmjava merged 1 commit intomainfrom
cursor/issue-47-demo-function-fcf7
May 5, 2026
Merged

feat(demo-function): address GitHub issue #47 (Playwright test mode, VHS, caching)#48
jmjava merged 1 commit intomainfrom
cursor/issue-47-demo-function-fcf7

Conversation

@jmjava
Copy link
Copy Markdown
Owner

@jmjava jmjava commented May 5, 2026

Summary

Completes the outstanding pieces of issue #47 for docgen demo-function:

  • CLI: --manifest and --output (directory); --output-dir remains as a hidden backward-compatible alias.
  • Playwright test recording (F2): YAML can set demonstration.spec + demonstration.grep; docgen runs npx playwright test with --video=on and viewport from output_budget.resolution (F3).
  • CLI / VHS: kind: cli requires demonstration.tape; renders via existing VHS runner (VHSRunner.render_tape_at), resolves tape/output relative to the manifest directory using Config.minimal.
  • Caching: cache key uses sha256(fn_source_sha + intent_sha + fixture_sha) per the contract (first 16 hex chars stored).
  • Assertions: assertions_to_surface are burned in as bottom subtitles (ffmpeg WebVTT) on the visual before optional TTS mux.
  • Length cap: final rendered.mp4 is trimmed to output_budget.duration_seconds (hard cap 60s unchanged).
  • F1 / F6 / F7: WebM → MP4 transcode path preserved; wait_for_text uses locator API; pytest marker remains AST-based.

Test plan

  • pytest tests/test_demo_function.py tests/test_config.py (or full tests minus e2e as in CI)
  • E2E kind: cli / VHS tests skip when vhs is not on PATH.
Open in Web Open in Cursor 

Align `docgen demo-function` with issue #47: `--manifest` + `--output` (keep
`--output-dir` as hidden alias), cache key sha256(fn_source+intent+fixtures),
Playwright test recording via `npx playwright test` when manifest sets
`demonstration.spec`/`grep`, real `kind: cli` via VHS tape paths,
assertion captions burned with ffmpeg subtitles, and duration trim to
output_budget. Add Config.minimal and VHSRunner.render_tape_at for standalone use.

Co-authored-by: John Menke <jmjava@gmail.com>
@jmjava jmjava marked this pull request as ready for review May 5, 2026 13:25
@jmjava jmjava merged commit 36f51f7 into main May 5, 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

Development

Successfully merging this pull request may close these issues.

2 participants