Skip to content

fix: harden video-translate from end-to-end testing#45

Closed
davidchou-heygen wants to merge 1 commit into
heygen-com:rewrite/video-translate-v3from
davidchou-heygen:rewrite/video-translate-v3
Closed

fix: harden video-translate from end-to-end testing#45
davidchou-heygen wants to merge 1 commit into
heygen-com:rewrite/video-translate-v3from
davidchou-heygen:rewrite/video-translate-v3

Conversation

@davidchou-heygen
Copy link
Copy Markdown
Collaborator

Follow-up to #43 — eight fixes found by running the skill end-to-end against real translations. Targeting Ken's PR branch directly so it lands as part of #43 when merged.

Install path

  • Move skills/video-translate/video-translate/ to match heygen-avatar/ and heygen-video/ layout (./setup looks for skills at repo root)
  • Register video-translate in setup's SKILLS array so it gets symlinked alongside the other two

Skill content

  • Interactive intake — ask one question at a time, extract from first message, propose sensible defaults instead of a 4-question form
  • API key resolution from ~/.heygen/config — mirrors parent SKILL.md's 3-source order (env > config file > prompt user)
  • Soak-then-tight polling — 5-min silent soak, then 30s polls until terminal; never "check back in 20 min"
  • Backgrounded bash polling — replaces the broken Agent subagent path (subagents can't inherit Bash approvals in Claude Code, every curl in them dies on permission denial)
  • Upfront approval-count warning before launching N background polls
  • Narrate-before-each-Bash rule — one sentence about why before every shell call
  • Markdown-link-wrapped delivery — flag emoji header + view-online link + [Download .mp4] + [SRT] · [VTT]; stops dumping 200-char signed URLs into the terminal
  • Shell hygiene section — env vars don't persist across Bash calls (inline auth load every time), zsh "no matches found" = unquoted glob, don't burn approvals on diagnostics
  • Fix \$status zsh read-only collision in poll script template (rename to \$st with explanatory comment)
  • Correct languages endpoint response shape: real API returns { languages: string[] }, not { data: [{ code, name }] }
  • Correct dashboard URL pattern: /videos/{id} not /video-translate/{id}

Test plan

  • Run ./setup from a fresh checkout — verify video-translate symlinks into ~/.claude/skills
  • Submit a translation end-to-end and verify: one approval per language, no foreground polling, deliverable renders with clickable links
  • Verify the language list query returns successfully on first call (no jq path error)

Found and fixed eight issues by running the skill end-to-end against
real translations. All changes are tightly coupled — each fix came
from a real failure or friction point in the same debugging session.

Install path:
- Move skills/video-translate/ to repo root to match heygen-avatar/
  and heygen-video/ layout (setup looks for skills at root)
- Register video-translate in setup's SKILLS array so it gets
  symlinked alongside the other two skills

Skill content:
- Interactive intake: ask one question at a time, extract from first
  message before asking, propose sensible defaults instead of a
  4-question form
- API key resolution from ~/.heygen/config (mirrors parent SKILL.md's
  3-source order — env > config file > prompt user)
- Soak-then-tight polling cadence: 5-min silent soak, then 30s polls
  until terminal; never "check back in 20 min" (optimizes for cache,
  not user wait)
- Backgrounded bash polling (replaces broken Agent subagent path —
  subagents can't inherit Bash approvals in Claude Code so every
  curl in them dies on permission denial)
- Upfront approval-count warning before launching N background polls
- Narrate-before-each-Bash rule: one sentence about why before every
  shell call, especially for backgrounded scripts the user can't see
- Markdown-link-wrapped delivery: flag emoji header + view-online
  link + [Download .mp4] + [SRT] · [VTT]; stops dumping 200-char
  signed URLs into the terminal
- Shell hygiene section: env vars don't persist across Bash calls
  (inline auth load every time), zsh "no matches found" = unquoted
  glob, don't burn approvals on diagnostics
- Fix \$status zsh read-only collision in poll script template
  (rename to \$st with explanatory comment)
- Correct languages endpoint response shape: real API returns
  { languages: string[] }, not { data: [{ code, name }] }
- Correct dashboard URL pattern: /videos/{id} not /video-translate/{id}

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@davidchou-heygen
Copy link
Copy Markdown
Collaborator Author

Superseded by #46 (PR against master containing @kenchung's full v3 rewrite + my hardening commit). Closing this since it stacked on #43, which is also being superseded.

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