Skip to content

feat(agentic): add subtitle enrichment workflow backend#886

Draft
lumberman wants to merge 16 commits into
mainfrom
feat/116-agentic-subtitle-enrichment-workflow
Draft

feat(agentic): add subtitle enrichment workflow backend#886
lumberman wants to merge 16 commits into
mainfrom
feat/116-agentic-subtitle-enrichment-workflow

Conversation

@lumberman
Copy link
Copy Markdown
Collaborator

Summary

  • adds the Agentic subtitle enrichment service contract, route, idempotency handling, and Mastra workflow registration
  • adds Manager feature-flagged dispatch plus Agentic callback ingestion and subtitle-only job steps
  • records the remaining real execution and full user smoke work in todos/016-pending-p1-complete-agentic-subtitle-execution-and-smoke.md

Status

Draft PR. This branch implements the backend bridge and prototype workflow events. Real subtitle transcription, translation artifact generation, Mux subtitle publication, Manager Coverage browser proof, and Studio run visibility proof are intentionally tracked as follow-up before this should be treated as production-complete.

Red / Green TDD

Red captured before implementation:

  • Agentic contract/API/workflow files did not exist and focused Agentic tests failed.
  • Manager Agentic client/event ingestion/enrich dispatch tests failed before feature wiring.
  • Subtitle-only workflow step tests failed before the new step initializer.

Green validation run:

  • pnpm --filter @forge/agentic lint
  • pnpm --filter @forge/agentic typecheck
  • pnpm --filter @forge/agentic test
  • pnpm --filter @forge/agentic build
  • pnpm --filter @forge/manager lint
  • pnpm --filter @forge/manager typecheck
  • pnpm --filter @forge/manager test
  • pnpm run format:check
  • git diff --check

Smoke Proof

  • Local Agentic dev route smoke returned 200 for /health.
  • Anonymous /api/agents returned 401.
  • Service token remained blocked from built-in /api/agents.
  • Service token successfully queued POST /forge/subtitle-enrichment-runs and emitted prototype callback events to a local Manager stub.
  • Screenshots saved locally under output/playwright/agentic-subtitle-health-smoke.png and output/playwright/agentic-subtitle-unauthorized-smoke.png.

Post-Deploy Monitoring & Validation

Validation window: first staging deploy and first 24h after enabling AGENTIC_SUBTITLE_ENRICHMENT_ENABLED=true; owner: Manager/Agentic operator.

Logs/search terms:

  • Agentic: subtitle-enrichment, manager_unavailable, mastra_runtime_error, /forge/subtitle-enrichment-runs
  • Manager: api/agentic/subtitle-enrichment/events, Failed to launch Agentic subtitle enrichment workflow, event_ingest_failed

Healthy signals:

  • /health stays public on the agentic Railway service.
  • POST /forge/subtitle-enrichment-runs returns 202 only with AGENTIC_SERVICE_API_KEY.
  • Anonymous and service-token access to built-in /api/* remain 401.
  • Manager subtitle-only jobs show only transcription, translation, and Mux upload steps.

Failure signals / rollback:

  • Repeated manager_unavailable, callback 5xx, or Manager job creation failures.
  • Any anonymous Studio/API access success.
  • Subtitle-only jobs showing unrelated full-enrichment steps as pending.

Rollback/mitigation: set AGENTIC_SUBTITLE_ENRICHMENT_ENABLED=false in Manager; keep local Manager workflow path active until the follow-up real execution todo is complete.

@railway-app
Copy link
Copy Markdown

railway-app Bot commented May 5, 2026

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

Service Status Web Updated (UTC)
@forge/web ✅ Success (View Logs) May 5, 2026 at 7:42 pm
@forge/manager ✅ Success (View Logs) May 5, 2026 at 7:31 pm
@forge/cms ✅ Success (View Logs) May 5, 2026 at 4:48 pm

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