Vadym Samoilenko
a3b300b76a
docs: add canonical documentation + audit cleanup
...
- AGENTS.md: canonical project entry point (Quick Nav, pipeline, constraints)
- docs/: complete docs tree — architecture, API spec, DB schema, infra,
runbook, requirements, tech stack, principles, reference ADRs, guides,
tasks backlog, testing strategy
- tests/README.md: test commands, structure, known gaps
- README.md / CLAUDE.md / DEPLOYMENT.md: updated with canonical doc links
- .archive/: backup of pre-documentation-pipeline originals
- backend/uv.lock: uv dependency lockfile
- Delete committed __pycache__ .pyc files (should have been gitignored)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-29 14:22:51 +01:00
Vadym Samoilenko
ae2c474061
feat: integrate oliver-cost-tracker SDK into video-accessibility
...
Add AI cost tracking to all Gemini and TTS call sites:
- config.py: add COST_TRACKER_* env vars (base_url, api_key, source_app,
outbox_path, enabled)
- dependencies.py: add get_cost_tracker() factory (lru_cache, graceful
degradation if SDK not installed)
- models/job.py: add cost_tracker_project_id field for cost attribution
- services/gemini.py:
- add import time, _record_gemini_usage() helper (reads usage_metadata)
- add _cost_ctx kwarg to extract_accessibility, extract_accessibility_targeted,
transcreate_content, translate_vtt, rewrite_tts_cue
- record usage after every generate_content call via asyncio.create_task()
- tasks/ingest_and_ai.py: pass _cost_ctx (user_id, job_id, project_id) to
extract_accessibility
- tasks/translate_and_synthesize.py: build _cost_ctx from job_doc and pass
to transcreate_content + translate_vtt calls
- tasks/tts_synthesis.py: add user_id + cost_project_id kwargs, add
_record_tts_cost() helper (records len(text) chars to cost tracker)
- pyproject.toml: document SDK install instructions (comment)
- .env.prod.example: add COST_TRACKER_* vars
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 11:30:46 +01:00
michael
dab294f18a
feat: streamline QC approval to skip translation pipeline
...
QC approval now transitions jobs directly to pending_final_review
since translation, TTS, and accessible video rendering happen before
QC review. Removes unnecessary translate_and_synthesize_task trigger
on approval.
- Update approve_source() to use PENDING_FINAL_REVIEW status
- Update bulk_approve_jobs() to use PENDING_FINAL_REVIEW status
- Remove translate_and_synthesize_task.delay() calls from both endpoints
- Update JobDetail progress indicator to reflect new flow
- Update CLAUDE.md state machine documentation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 10:37:37 -06:00