Skip to content

Add Phase A product workspace and pipeline control-plane (pipeline app, docs, env-driven settings, tests)#115

Open
RitheeshBaradwaj wants to merge 1 commit into
mainfrom
codex/complete-mimasa-implementation-for-production
Open

Add Phase A product workspace and pipeline control-plane (pipeline app, docs, env-driven settings, tests)#115
RitheeshBaradwaj wants to merge 1 commit into
mainfrom
codex/complete-mimasa-implementation-for-production

Conversation

@RitheeshBaradwaj
Copy link
Copy Markdown
Member

Motivation

  • Provide a production-oriented Phase A plan and governance artifacts under product/ to drive an audio-first localization MVP.
  • Introduce a dedicated pipeline control-plane to make job/stage lifecycle, artifacts, retries, deliveries, alerts and review workflows first-class and auditable.
  • Harden runtime configuration to be environment-driven so deployments can run safely in staging/production without code changes.

Description

  • Added a full product/ workspace with strategy, architecture, implementation plan, ADRs, governance contracts, operational runbooks, QA matrices, team roles, prompts, and execution board (WI-001..WI-017).
  • Introduced a new Django pipeline app implementing models, migrations, admin, serializers, views, URLs, templates and middleware to manage Job, StageExecution, Artifact, DeadLetterEvent, DeliveryRecord, AlertEvent, ReviewCorrection, and ReviewDecision entities; this includes orchestrator.py, retry_controls.py, delivery.py, alerting.py, telemetry.py, and stage skeletons (asr, mt, tts, compositing, vertical_slice).
  • Implemented end-to-end orchestration primitives with idempotent transitions via transition_job, legal transition map, dead-letter recording, replay/retry APIs, tokenized signed deliveries and webhook dispatch.
  • Added management commands and automation hooks: check_pipeline_alerts, run_phase_a_acceptance, run_phase_a_scorecard, validate_phase_a_slos, and release_readiness_phase_a.
  • Updated core Django settings to be environment-driven (MIMASA_* variables), pluggable DATABASE_URL, Redis/Channels handling, Celery backend settings, and production security defaults in src/api/mimasa/mimasa/settings.py.
  • Extended the translation app to track user, attach output files, create TranslationNotification objects, add auth endpoints (/auth/signup/, /auth/login/), notification list/ack endpoints, and improved run_translation Celery task to publish notifications and download tokens.
  • Updated README.md with a Product Workspace link, production environment configuration examples and documented new API features.
  • Added channels_redis to requirements.txt and removed several experimental/temp audioseparator scripts.

Testing

  • Added unit/integration tests under src/api/mimasa/pipeline/tests.py covering alert evaluation/sync, acceptance checks, QA scorecard, SLO validation and release-readiness report, and ran them with pytest; all tests passed.
  • Executed pipeline alerting persistence via the management command flow (check_pipeline_alerts) in tests to validate sync_alert_events behavior; observations in tests succeeded.
  • Performed smoke validation of API shapes for telemetry/endpoints via the test suite (alerts, acceptance, scorecard and release readiness) and all automated checks returned expected shapes/success states.

Codex Task

raise Http404("Invalid download token")

try:
return FileResponse(open(file_path, "rb"))
trace_id=job.trace_id,
)
except InvalidTransitionError as exc:
return Response({"detail": str(exc)}, status=status.HTTP_400_BAD_REQUEST)
try:
result = transition_job(job=job, **request_serializer.validated_data)
except InvalidTransitionError as exc:
return Response({"detail": str(exc)}, status=status.HTTP_400_BAD_REQUEST)
stage_name=serializer.validated_data.get("stage_name"),
)
except (ValueError, InvalidTransitionError) as exc:
return Response({"detail": str(exc)}, status=status.HTTP_400_BAD_REQUEST)
idempotency_key=serializer.validated_data["idempotency_key"],
)
except (ValueError, InvalidTransitionError) as exc:
return Response({"detail": str(exc)}, status=status.HTTP_400_BAD_REQUEST)
try:
artifact = resolve_delivery_download(job=job, delivery=delivery, token=token)
except Http404 as exc:
return Response({"detail": str(exc)}, status=status.HTTP_404_NOT_FOUND)
failure_idempotency_key=serializer.validated_data["idempotency_key"],
)
return Response(
{"detail": str(exc), "dead_letter_id": str(dead_letter.id), "failed_attempt": dead_letter.failed_attempt},
failure_idempotency_key=serializer.validated_data["idempotency_key"],
)
return Response(
{"detail": str(exc), "dead_letter_id": str(dead_letter.id), "failed_attempt": dead_letter.failed_attempt},
failure_idempotency_key=serializer.validated_data["idempotency_key"],
)
return Response(
{"detail": str(exc), "dead_letter_id": str(dead_letter.id), "failed_attempt": dead_letter.failed_attempt},
failure_idempotency_key=serializer.validated_data["idempotency_key"],
)
return Response(
{"detail": str(exc), "dead_letter_id": str(dead_letter.id), "failed_attempt": dead_letter.failed_attempt},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants