First-attempt commit3a5c6e184only captured the .gitignore change; the pre-commit hook silently dropped the 343 staged moves/deletes during lint-staged's "no matching task" path. This commit re-applies the intended J1 content on top ofbec75f143(which was pushed in parallel). Uses --no-verify because: - J1 only touches .md/.json/.log/.png/binaries — zero code that would benefit from lint-staged, typecheck, or vitest - The hook demonstrated it corrupts pure-rename commits in this repo - Explicitly authorized by user for this one commit Changes (343 total: 169 deletions + 174 renames): Binaries purged (~167 MB): - veza-backend-api/{server,modern-server,encrypt_oauth_tokens,seed,seed-v2} Generated reports purged: - 9 apps/web/lint_report*.json (~32 MB) - 8 apps/web/tsc_*.{log,txt} + ts_*.log (TS error snapshots) - 3 apps/web/storybook_*.json (1375+ stored errors) - apps/web/{build_errors*,build_output,final_errors}.txt - 70 veza-backend-api/coverage*.out + coverage_groups/ (~4 MB) - 3 veza-backend-api/internal/handlers/*.bak Root cleanup: - 54 audit-*.png (visual regression baselines, ~11 MB) - 9 stale MVP-era scripts (Jan 27, hardcoded v0.101): start_{iteration,mvp,recovery}.sh, test_{mvp_endpoints,protected_endpoints,user_journey}.sh, validate_v0101.sh, verify_logs_setup.sh, gen_hash.py Session docs archived (not deleted — preserved under docs/archive/): - 78 apps/web/*.md → docs/archive/frontend-sessions-2026/ - 43 veza-backend-api/*.md → docs/archive/backend-sessions-2026/ - 53 docs/{RETROSPECTIVE_V,SMOKE_TEST_V,PLAN_V0_,V0_*_RELEASE_SCOPE, AUDIT_,PLAN_ACTION_AUDIT,REMEDIATION_PROGRESS}*.md → docs/archive/v0-history/ README.md and CONTRIBUTING.md preserved in apps/web/ and veza-backend-api/. Note: The .gitignore rules preventing recurrence were already pushed in3a5c6e184and remain in place — this commit does not modify .gitignore. Refs: AUDIT_REPORT.md §11
5.7 KiB
5.7 KiB
Smoke Test v0.703 — Go Live & Streaming Complet
Prérequis
veza-backend-apicompilé et démarré (go run ./cmd/api)- PostgreSQL avec migrations appliquées jusqu'à 117
.envavecDATABASE_URL,JWT_SECRET- Utilisateur enregistré avec token JWT valide
1. Stream Key Management (GL1)
1.1 Obtenir sa stream key
curl -s http://localhost:8080/api/v1/live/streams/me/key \
-H "Authorization: Bearer {TOKEN}" | jq .
# Attendu: { "success": true, "data": { "stream_key": "uuid-format", "rtmp_url": "rtmp://stream.veza.app/live" } }
1.2 Régénérer sa stream key
curl -s -X POST http://localhost:8080/api/v1/live/streams/me/key/regenerate \
-H "Authorization: Bearer {TOKEN}" | jq .
# Attendu: 200, nouvelle stream_key différente de la précédente
1.3 Stream key sans auth
curl -s http://localhost:8080/api/v1/live/streams/me/key | jq .
# Attendu: 401 Unauthorized
2. Create & Update Stream (GL1)
2.1 Créer un stream
curl -s -X POST http://localhost:8080/api/v1/live/streams \
-H "Authorization: Bearer {TOKEN}" \
-H "Content-Type: application/json" \
-d '{"title": "My First Stream", "description": "Testing Go Live", "category": "music", "tags": ["beats", "live"]}' | jq .
# Attendu: 201 Created, stream avec id, stream_key (absent du JSON car json:"-"), title, tags
2.2 Lister mes streams
curl -s http://localhost:8080/api/v1/live/streams/me \
-H "Authorization: Bearer {TOKEN}" | jq .
# Attendu: { "success": true, "data": { "streams": [...] } }
# Attendu: stream_key visible dans la réponse (endpoint protégé)
2.3 Mettre à jour un stream
curl -s -X PUT http://localhost:8080/api/v1/live/streams/{STREAM_ID} \
-H "Authorization: Bearer {TOKEN}" \
-H "Content-Type: application/json" \
-d '{"title": "Updated Title", "description": "New description"}' | jq .
# Attendu: 200, stream avec titre mis à jour
2.4 Update ownership check
# Utiliser un token d'un autre utilisateur
curl -s -X PUT http://localhost:8080/api/v1/live/streams/{STREAM_ID} \
-H "Authorization: Bearer {OTHER_TOKEN}" \
-H "Content-Type: application/json" \
-d '{"title": "Hijack"}' | jq .
# Attendu: 404/403, "stream not found"
3. List & VOD (GL1)
3.1 Lister les streams live
curl -s "http://localhost:8080/api/v1/live/streams?is_live=true" | jq .
# Attendu: 200, streams avec is_live=true uniquement
3.2 Lister tous les streams (inclut VOD)
curl -s "http://localhost:8080/api/v1/live/streams" | jq .
# Attendu: 200, tous les streams (live et terminés)
3.3 Détail d'un stream
curl -s http://localhost:8080/api/v1/live/streams/{STREAM_ID} | jq .
# Attendu: 200, stream details (stream_key absent du JSON public)
4. Go Live Frontend (GL2)
4.1 Page Go Live accessible
# Frontend: naviguer vers /live/go-live (authentifié)
# Vérifier: formulaire avec titre, description, catégorie, tags
# Vérifier: stream key masquée par défaut
# Vérifier: bouton "Reveal" affiche la stream key
# Vérifier: bouton "Copy" copie dans le clipboard
# Vérifier: instructions OBS/Streamlabs visibles
4.2 Navbar Go Live
# Frontend: cliquer sur "Go Live" dans le menu utilisateur de la Navbar
# Vérifier: navigation vers /live/go-live (PAS de toast "coming soon")
4.3 Lazy loading
# Ouvrir DevTools → Network
# Naviguer vers /live/go-live
# Vérifier: chunk GoLivePage chargé dynamiquement
4.4 Regenerate key
# Sur la page Go Live, cliquer "Regenerate"
# Vérifier: la stream key change
# Vérifier: toast de confirmation
5. Live Chat (GL3)
5.1 Chat connecté WebSocket
# Frontend: naviguer vers /live (page streams)
# Sélectionner un stream actif
# Vérifier: le chat affiche des messages en temps réel (si WebSocket actif)
# Vérifier: l'input de message envoie un message
5.2 Join/leave
# Naviguer vers un stream → observer "joined" dans le chat
# Quitter la page → observe "left" côté serveur (via WebSocket disconnect)
6. Player Enhancements (GL4)
6.1 Playback speed
# Frontend: lancer une track dans le player
# Vérifier: bouton de vitesse visible (1x par défaut)
# Cliquer: cycle 0.5x → 0.75x → 1x → 1.25x → 1.5x → 2x
# Vérifier: la vitesse de lecture change effectivement
6.2 Media Session API
# Lancer une track dans le player
# Vérifier: notification OS affiche titre + artiste + artwork
# Vérifier: boutons play/pause/next/previous fonctionnent depuis la notification
# Note: Media Session API requiert HTTPS en production ; test en localhost fonctionne
7. MSW (Storybook)
7.1 Stories GoLiveView
cd apps/web && npm run storybook
# Naviguer vers Features/Live/GoLiveView
# Vérifier: Default (formulaire + stream key), Loading (skeleton), Error, StreamKeyVisible
7.2 MSW live handlers
# En mode MSW (npm run dev), naviguer vers /live/go-live
# Vérifier: stream key mockée s'affiche
# Vérifier: regenerate retourne une nouvelle key mockée
8. Tests automatisés
8.1 Backend
cd veza-backend-api && go test ./internal/services/... -v -run "LiveStream"
# Attendu: 9 tests pass
8.2 Frontend build
cd apps/web && npm run build
# Attendu: 0 errors
9. Documentation
docs/API_REFERENCE.mdcontient section Live Streaming (7 endpoints)CHANGELOG.mdcontient entrée v0.703docs/PROJECT_STATE.md: Dernier tag = v0.703docs/FEATURE_STATUS.md: limitation Go Live supprimée, section "Livré en v0.703"git tag v0.703créé sur le bon commit