Skip to content

feat(manager): harden QA subtitle enrichment workflow#648

Merged
lumberman merged 35 commits intomainfrom
feat/stage-snapshot-enrichment
Apr 10, 2026
Merged

feat(manager): harden QA subtitle enrichment workflow#648
lumberman merged 35 commits intomainfrom
feat/stage-snapshot-enrichment

Conversation

@lumberman
Copy link
Copy Markdown
Collaborator

@lumberman lumberman commented Apr 3, 2026

Summary

  • replace the old manager translation flow with the split subtitle translation pipeline and add Vitest coverage for the new deterministic helpers and workflow behavior
  • harden QA snapshot enrichment by cloning supported snapshot videos into stage Mux, resolving real source and target language codes, and dimming unsupported coverage tiles
  • clean up job handling by fixing source summaries, artifact manifests and download links, redacting materialization provenance, reducing hot-path overfetch, and surfacing artifact persistence failures explicitly

Roadmap Link

Testing

  • pnpm --filter @forge/manager test
  • pnpm --filter @forge/manager lint
  • pnpm --filter @forge/manager typecheck
  • Browser QA on http://localhost:3002/dashboard/coverage?languageId=6414
  • Browser QA on completed job detail pages to verify artifact links render and open in new tabs

Post-Deploy Monitoring & Validation

  • What to monitor/search
    • Logs:
      • subtitle_translation_start
      • subtitle_translation_complete
      • language_failed
      • workflow_error
      • transcription_waiting_for_subtitles
    • Metrics/Dashboards:
      • manager request volume/error rate for /api/enrich, /api/jobs, /api/videos
      • stage Mux asset creation success/failure for QA enrichment runs
  • Validation checks (queries/commands)
    • Start one QA enrichment job from coverage and confirm it redirects to /dashboard/jobs/<jobId>
    • Confirm the created job stores normalized target language codes, not raw CMS IDs
    • Open a completed job detail page and verify transcript/subtitles/metadata artifact links render
  • Expected healthy behavior
    • unsupported videos remain dimmed and unselectable in translate mode
    • supported QA enrich jobs create a fresh stage Mux asset, advance through workflow steps, and expose artifact links on the job detail page
    • all-target translation failures mark the translation step and overall job as failed
  • Failure signal(s) / rollback trigger
    • /api/enrich starts failing for previously supported QA videos
    • manager job detail pages lose artifact links for completed steps
    • translation jobs complete successfully with zero translated outputs
  • Validation window & owner
    • Window: first QA session after deploy and first day of manager usage
    • Owner: manager/subtitles QA owner

Compound Engineered

lumberman and others added 10 commits March 28, 2026 09:29
aiMetadata boolean was truthy-checked, collapsing false (human-verified)
into "none". Now explicitly compares: true → "ai", false → "human",
null → "none".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the full-text translation step with a 3-phase pipeline that
produces timed VTT subtitle files for 50+ languages:

- Phase 1: Smart chunking groups VTT segments into thought blocks
- Phase 2: Creative translation via LLM with no structural constraints
- Phase 3: LLM re-timing redistributes text across time slots
- Correction loop retries invalid output with error feedback
- Deterministic fallback guarantees valid subtitles when LLM fails
- Per-language custom prompts and glossary support
- p-limit(10) parallel execution across target languages

Solves the "geometry of language" problem where languages like Japanese
compress and German reorders content relative to the source, preventing
blank screens in translated subtitles.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@railway-app
Copy link
Copy Markdown

railway-app bot commented Apr 3, 2026

🚅 Deployed to the forge-pr-648 environment in forge

Service Status Web Updated (UTC)
@forge/manager ✅ Success (View Logs) Apr 10, 2026 at 12:47 am
@forge/web ✅ Success (View Logs) Apr 9, 2026 at 12:57 pm
@forge/cms ✅ Success (View Logs) Apr 9, 2026 at 12:56 pm

@railway-app railway-app bot temporarily deployed to forge / forge-pr-648 April 3, 2026 10:13 Destroyed
@railway-app railway-app bot temporarily deployed to forge / forge-pr-648 April 3, 2026 10:23 Destroyed
@railway-app railway-app bot temporarily deployed to forge / forge-pr-648 April 4, 2026 17:27 Destroyed
@railway-app railway-app bot temporarily deployed to forge / forge-pr-648 April 5, 2026 00:18 Destroyed
@railway-app railway-app bot temporarily deployed to forge / forge-pr-648 April 9, 2026 01:25 Destroyed
@railway-app railway-app bot temporarily deployed to forge / forge-pr-648 April 9, 2026 01:37 Destroyed
@railway-app railway-app bot temporarily deployed to forge / forge-pr-648 April 9, 2026 11:43 Destroyed
@railway-app railway-app bot temporarily deployed to forge / forge-pr-648 April 9, 2026 12:53 Destroyed
@railway-app railway-app bot temporarily deployed to forge / forge-pr-648 April 9, 2026 14:21 Destroyed
Add flag-gated direct Mux asset reuse for enrichment jobs.

Recover missing playback IDs from live Mux state.

Skip subtitle regeneration when a reusable track already exists.
@railway-app railway-app bot temporarily deployed to forge / forge-pr-648 April 10, 2026 00:42 Destroyed
@lumberman lumberman merged commit b53a335 into main Apr 10, 2026
29 of 30 checks passed
@lumberman lumberman deleted the feat/stage-snapshot-enrichment branch April 10, 2026 00:49
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