mirror of
https://github.com/nomadkaraoke/karaoke-gen.git
synced 2026-12-04 17:16:04 +09:00
Compare commits
9
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
597492b687 | ||
|
|
51cb735023 | ||
|
|
3ff633ddd0 | ||
|
|
e877c5fb69 | ||
|
|
adec1adc5f | ||
|
|
342f128a54 | ||
|
|
543ecd6f66 | ||
|
|
e8db79a5db | ||
|
|
058113cde3 |
No files matched your search
@@ -874,7 +874,7 @@ jobs:
|
||||
--max-instances 50 \
|
||||
--min-instances 0 \
|
||||
--set-env-vars "GOOGLE_CLOUD_PROJECT=${{ env.PROJECT_ID }},GCS_BUCKET_NAME=karaoke-gen-storage-${{ env.PROJECT_ID }},FIRESTORE_COLLECTION=jobs,ENVIRONMENT=production,AUDIO_SEPARATOR_API_URL=https://nomadkaraoke--audio-separator-api.modal.run,KARAOKE_GEN_VERSION=$VERSION,DEFAULT_DROPBOX_PATH=/MediaUnsynced/Karaoke/Tracks-Organized,DEFAULT_GDRIVE_FOLDER_ID=1laRKAyxo0v817SstfM5XkpbWiNKNAMSX,ENABLE_CLOUD_TASKS=true,CLOUD_RUN_SERVICE_URL=https://api.nomadkaraoke.com,GCP_REGION=us-central1,DEFAULT_ENABLE_YOUTUBE_UPLOAD=true,DEFAULT_BRAND_PREFIX=NOMAD" \
|
||||
--set-secrets "AUDIOSHAKE_API_TOKEN=audioshake-api-key:latest,GENIUS_API_TOKEN=genius-api-key:latest,SPOTIFY_COOKIE_SP_DC=spotify-cookie:latest,RAPIDAPI_KEY=rapidapi-key:latest,DEFAULT_DISCORD_WEBHOOK_URL=discord-releases-webhook:latest,ADMIN_TOKENS=admin-tokens:latest,RED_API_KEY=red-api-key:latest,RED_API_URL=red-api-url:latest,OPS_API_KEY=ops-api-key:latest,OPS_API_URL=ops-api-url:latest,FLACFETCH_API_URL=flacfetch-api-url:latest,FLACFETCH_API_KEY=flacfetch-api-key:latest,SENDGRID_API_KEY=sendgrid-api-key:latest,STRIPE_SECRET_KEY=stripe-secret-key:latest,STRIPE_WEBHOOK_SECRET=stripe-webhook-secret:latest"
|
||||
--set-secrets "AUDIOSHAKE_API_TOKEN=audioshake-api-key:latest,GENIUS_API_TOKEN=genius-api-key:latest,SPOTIFY_COOKIE_SP_DC=spotify-cookie:latest,RAPIDAPI_KEY=rapidapi-key:latest,DEFAULT_DISCORD_WEBHOOK_URL=discord-releases-webhook:latest,ADMIN_TOKENS=admin-tokens:latest,RED_API_KEY=red-api-key:latest,RED_API_URL=red-api-url:latest,OPS_API_KEY=ops-api-key:latest,OPS_API_URL=ops-api-url:latest,FLACFETCH_API_URL=flacfetch-api-url:latest,FLACFETCH_API_KEY=flacfetch-api-key:latest,SENDGRID_API_KEY=sendgrid-api-key:latest,STRIPE_SECRET_KEY=stripe-secret-key:latest,STRIPE_WEBHOOK_SECRET=stripe-webhook-secret:latest,LANGFUSE_PUBLIC_KEY=langfuse-public-key:latest,LANGFUSE_SECRET_KEY=langfuse-secret-key:latest,LANGFUSE_HOST=langfuse-host:latest"
|
||||
|
||||
- name: Verify deployment and version
|
||||
run: |
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
|
||||
## Recent Changes
|
||||
|
||||
- **Cold Start UX** (2025-12-30): Frontend now shows friendly "Warming up the generator..." messages when backend is slow to respond (cold start after deployment or inactivity). Progressive messages appear after 5s and 15s to reassure users during 30s+ cold starts.
|
||||
- **Cloud Output Structure Fix** (2025-12-30): Fixed remote CLI (`karaoke-gen-remote`) to produce identical output as local CLI: YouTube uploads now work, Dropbox includes stems/ and lyrics/ subfolders, instrumental filenames use actual model names. See [archive/2025-12-30-cloud-output-structure-fix.md](archive/2025-12-30-cloud-output-structure-fix.md)
|
||||
- **Auth Session Persistence Fix** (2025-12-30): Fixed two bugs causing 401 errors despite valid sessions: timezone-aware datetime comparisons in backend, and stale token caching in frontend. Firestore indexes now tracked in Pulumi. See [archive/2025-12-30-auth-session-persistence-fix.md](archive/2025-12-30-auth-session-persistence-fix.md)
|
||||
- **E2E Test Suite Consolidated** (2025-12-29): Tests reorganized into `production/` (real API) and `regression/` (mocked API, CI-safe). See [archive/2025-12-29-e2e-test-consolidation-plan.md](archive/2025-12-29-e2e-test-consolidation-plan.md)
|
||||
|
||||
@@ -1,100 +0,0 @@
|
||||
# E2E Test Improvements - December 30, 2025
|
||||
|
||||
## Summary
|
||||
|
||||
This document summarizes improvements made to the production E2E test and backend issues discovered during testing.
|
||||
|
||||
## E2E Test Improvements
|
||||
|
||||
### 1. Token Reuse Support
|
||||
- Added ability to use `KARAOKE_ACCESS_TOKEN` environment variable to skip MailSlurp enrollment
|
||||
- Helpful when MailSlurp rate limits are reached (30 inboxes/month free tier)
|
||||
- Test logs full token after successful enrollment for reuse
|
||||
|
||||
### 2. MailSlurp Rate Limit Handling
|
||||
- Added clear error messages when MailSlurp rate limit is reached
|
||||
- Provides instructions for getting a token manually or via API
|
||||
|
||||
### 3. Improved Job Status Polling (`pollJobStatus`)
|
||||
- Added retry logic (3 attempts) for API timeouts
|
||||
- Reduced individual request timeout to 30s with retries instead of single 2-minute wait
|
||||
- Added state_data inspection for accurate progress tracking
|
||||
- Logs only when progress changes (reduces noise)
|
||||
- Detects completion via `review_token`, `instrumental_token`, or `download_urls` even when status field is incorrect
|
||||
- Works around backend bug where status field doesn't update
|
||||
|
||||
### 4. Robust Job Creation
|
||||
- Retry logic for UI button clicks (3 attempts)
|
||||
- Falls back to direct API call if UI doesn't work
|
||||
- Captures job_id from API response since UI job list doesn't always refresh
|
||||
|
||||
### 5. Token Capture Helper
|
||||
- Created `capture-token.ts` helper for manual token capture
|
||||
- Run with `--headed` mode for manual login when MailSlurp is unavailable
|
||||
|
||||
### 6. Generating Screens Status Handling
|
||||
- Added `generating_screens` to accepted statuses in Step 6
|
||||
- Step 7 waits for screen generation to complete before attempting lyrics review
|
||||
- Handles transition from `generating_screens` → `awaiting_review`
|
||||
|
||||
### 7. Increased Timeouts
|
||||
- Job processing timeout increased from 10min to 20min
|
||||
- Full test timeout increased from 15min to 30min
|
||||
- Accounts for slow AI services and AudioShake latency
|
||||
|
||||
## Backend Issues Discovered
|
||||
|
||||
### 1. Job Status Not Updating
|
||||
- **Issue**: Job `status` field stays at "downloading" even after audio separation completes
|
||||
- **Workaround**: Test checks `state_data.audio_progress.stage` and `state_data.lyrics_progress.stage` for actual progress
|
||||
- **Impact**: Test needs to rely on state_data rather than status field
|
||||
|
||||
### 2. Lyrics Worker Agentic Correction Stuck
|
||||
- **Issue**: Lyrics worker crashes or times out during agentic correction phase
|
||||
- **Observed**: Workers stop logging after "Attempting agentic correction for gap X/Y"
|
||||
- **Jobs affected**: bcc74e79 (stuck at gap 1/52), 4c585c6f (stuck at gap 1/52), 66bbb6b5 (reached generating_screens but with AI errors)
|
||||
- **Likely cause**: Cloud Run timeout, Vertex AI/Gemini 404 errors ("Publisher Mode" errors)
|
||||
- **Impact**: Jobs either don't complete, or complete with gaps flagged for manual review
|
||||
|
||||
### 3. UI Job List Not Refreshing
|
||||
- **Issue**: Frontend job list shows "0 jobs" even after job creation
|
||||
- **Workaround**: Test captures job_id from API response directly
|
||||
- **Impact**: "Select Audio" button never visible in UI
|
||||
|
||||
## Test Coverage Status
|
||||
|
||||
### Working Steps (Steps 1-5)
|
||||
- [x] Landing page verification
|
||||
- [x] Beta enrollment via MailSlurp OR token auth
|
||||
- [x] Credits verification
|
||||
- [x] Job creation (UI or API fallback)
|
||||
- [x] Audio selection (UI or API fallback)
|
||||
|
||||
### Blocked Steps (Backend Issues)
|
||||
- [ ] Step 6: Wait for processing - blocked by lyrics worker timeout
|
||||
- [ ] Step 7: Lyrics review - never reached
|
||||
- [ ] Step 8: Instrumental selection - never reached
|
||||
- [ ] Step 9: Wait for completion - never reached
|
||||
- [ ] Step 10: Output verification - never reached
|
||||
|
||||
## Recommendations
|
||||
|
||||
1. **Fix Agentic Lyrics Correction**
|
||||
- Workers hang at "Attempting agentic correction for gap 1/52"
|
||||
- Add timeout/retry for agentic correction AI calls
|
||||
- Consider making agentic correction optional or async
|
||||
- Add better error logging when AI service fails
|
||||
|
||||
2. **Fix Status Field Updates**
|
||||
- Ensure job status updates as workers complete
|
||||
- Add status field for each worker (audio_status, lyrics_status)
|
||||
|
||||
3. **Fix Frontend Job List**
|
||||
- Investigate why jobs don't appear after creation
|
||||
- May be a caching or state management issue
|
||||
|
||||
## Files Changed
|
||||
|
||||
- `frontend/e2e/helpers/email-testing.ts` - MailSlurp rate limit handling
|
||||
- `frontend/e2e/production/full-user-journey.spec.ts` - All test improvements
|
||||
- `frontend/e2e/helpers/capture-token.ts` - New token capture helper
|
||||
@@ -8,6 +8,7 @@ import { useJobNotifications, useVisibilityRefresh } from "@/hooks/use-notificat
|
||||
import { Button } from "@/components/ui/button"
|
||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"
|
||||
import { Music2, RefreshCw, Loader2, Zap, ZapOff, Moon, Sun } from "lucide-react"
|
||||
import { WarmingUpLoader } from "@/components/WarmingUpLoader"
|
||||
import { JobCard } from "@/components/job"
|
||||
import { JobSubmission } from "@/components/job/JobSubmission"
|
||||
import { AuthStatus } from "@/components/auth"
|
||||
@@ -25,6 +26,7 @@ export default function AppPage() {
|
||||
const router = useRouter()
|
||||
const [jobs, setJobs] = useState<Job[]>([])
|
||||
const [isLoadingJobs, setIsLoadingJobs] = useState(true)
|
||||
const [isInitialLoad, setIsInitialLoad] = useState(true)
|
||||
const [isAuthenticated, setIsAuthenticated] = useState<boolean | null>(null)
|
||||
const { enabled: autoModeEnabled, setEnabled: setAutoMode, toggle: toggleAutoMode } = useAutoMode()
|
||||
const { isDarkMode, toggleTheme, mounted } = useTheme()
|
||||
@@ -33,6 +35,7 @@ export default function AppPage() {
|
||||
const loadJobs = useCallback(async () => {
|
||||
if (!getAccessToken()) {
|
||||
setIsLoadingJobs(false)
|
||||
setIsInitialLoad(false)
|
||||
return
|
||||
}
|
||||
try {
|
||||
@@ -45,6 +48,7 @@ export default function AppPage() {
|
||||
}
|
||||
} finally {
|
||||
setIsLoadingJobs(false)
|
||||
setIsInitialLoad(false)
|
||||
}
|
||||
}, [])
|
||||
|
||||
@@ -94,6 +98,15 @@ export default function AppPage() {
|
||||
)
|
||||
}
|
||||
|
||||
// Show warming up loader during initial job load (cold start scenario)
|
||||
if (isInitialLoad && isLoadingJobs) {
|
||||
return (
|
||||
<div className="min-h-screen flex items-center justify-center" style={{ background: 'var(--bg)' }}>
|
||||
<WarmingUpLoader spinnerClassName="w-10 h-10" />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="min-h-screen" style={{ background: 'var(--bg)' }}>
|
||||
{/* AutoProcessor - handles non-interactive mode */}
|
||||
|
||||
@@ -149,4 +149,13 @@
|
||||
.text-primary-500 { color: #3b82f6; }
|
||||
.bg-primary-500 { background-color: #3b82f6; }
|
||||
.hover\:bg-primary-600:hover { background-color: #2563eb; }
|
||||
|
||||
/* Fade in animation for cold start messages */
|
||||
@keyframes fade-in {
|
||||
from { opacity: 0; transform: translateY(-4px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
.animate-fade-in {
|
||||
animation: fade-in 0.3s ease-out forwards;
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,7 @@ import {
|
||||
} from 'lucide-react';
|
||||
import { api, setAccessToken, getAccessToken, CreditPackage, BetaEnrollResponse } from '@/lib/api';
|
||||
import { AuthDialog } from '@/components/auth/AuthDialog';
|
||||
import { WarmingUpLoader } from '@/components/WarmingUpLoader';
|
||||
|
||||
// FAQ data
|
||||
const faqs = [
|
||||
@@ -398,9 +399,7 @@ export default function LandingPage() {
|
||||
|
||||
{/* Package Selection */}
|
||||
{packagesLoading && (
|
||||
<div className="flex items-center justify-center py-8">
|
||||
<Loader2 className="w-8 h-8 animate-spin text-primary-400" />
|
||||
</div>
|
||||
<WarmingUpLoader className="py-8" />
|
||||
)}
|
||||
{packagesError && (
|
||||
<div className="text-center py-8 text-red-400">
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
'use client';
|
||||
|
||||
import { useState, useEffect } from 'react';
|
||||
import { Loader2 } from 'lucide-react';
|
||||
|
||||
interface WarmingUpLoaderProps {
|
||||
/** Custom class name for the container */
|
||||
className?: string;
|
||||
/** Custom class name for the spinner */
|
||||
spinnerClassName?: string;
|
||||
/** Time in ms before showing "warming up" message (default: 5000) */
|
||||
warmUpDelay?: number;
|
||||
/** Time in ms before showing "almost there" message (default: 15000) */
|
||||
almostThereDelay?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* A loading component that gracefully handles cold start delays.
|
||||
* Shows increasingly reassuring messages as load time increases.
|
||||
*/
|
||||
export function WarmingUpLoader({
|
||||
className = '',
|
||||
spinnerClassName = 'w-8 h-8',
|
||||
warmUpDelay = 5000,
|
||||
almostThereDelay = 15000,
|
||||
}: WarmingUpLoaderProps) {
|
||||
const [phase, setPhase] = useState<'initial' | 'warming' | 'almost'>('initial');
|
||||
|
||||
useEffect(() => {
|
||||
const warmUpTimer = setTimeout(() => {
|
||||
setPhase('warming');
|
||||
}, warmUpDelay);
|
||||
|
||||
const almostThereTimer = setTimeout(() => {
|
||||
setPhase('almost');
|
||||
}, almostThereDelay);
|
||||
|
||||
return () => {
|
||||
clearTimeout(warmUpTimer);
|
||||
clearTimeout(almostThereTimer);
|
||||
};
|
||||
}, [warmUpDelay, almostThereDelay]);
|
||||
|
||||
return (
|
||||
<div className={`flex flex-col items-center justify-center gap-3 ${className}`}>
|
||||
<Loader2
|
||||
className={`animate-spin ${spinnerClassName}`}
|
||||
style={{ color: 'var(--primary)' }}
|
||||
/>
|
||||
{phase === 'warming' && (
|
||||
<p className="text-sm animate-fade-in" style={{ color: 'var(--text-muted)' }}>
|
||||
Warming up the generator...
|
||||
</p>
|
||||
)}
|
||||
{phase === 'almost' && (
|
||||
<div className="text-center animate-fade-in">
|
||||
<p className="text-sm" style={{ color: 'var(--text-muted)' }}>Almost there...</p>
|
||||
<p className="text-xs mt-1" style={{ color: 'var(--text-muted)', opacity: 0.7 }}>
|
||||
First load can take up to 30 seconds
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -1,104 +0,0 @@
|
||||
/**
|
||||
* Helper script to capture a valid token by logging in manually.
|
||||
*
|
||||
* Run this when MailSlurp rate limits are reached:
|
||||
* npx playwright test --config=playwright.production.config.ts -g "capture token" --headed
|
||||
*
|
||||
* This will open a browser where you can:
|
||||
* 1. Complete beta enrollment manually (use your real email)
|
||||
* 2. Or log in if you already have an account
|
||||
*
|
||||
* The script will capture and display the token for you to add to .env.local
|
||||
*/
|
||||
|
||||
import { test, expect } from '@playwright/test';
|
||||
|
||||
const PROD_URL = 'https://gen.nomadkaraoke.com';
|
||||
|
||||
test.describe('Token Capture Helper', () => {
|
||||
test('capture token - manually log in and capture token', async ({ page }) => {
|
||||
// This test is designed for manual login, so give plenty of time
|
||||
test.setTimeout(300000); // 5 minutes
|
||||
|
||||
console.log('\n========================================');
|
||||
console.log('TOKEN CAPTURE HELPER');
|
||||
console.log('========================================');
|
||||
console.log('');
|
||||
console.log('Instructions:');
|
||||
console.log('1. A browser window will open to gen.nomadkaraoke.com');
|
||||
console.log('2. Complete beta enrollment or log in with an existing account');
|
||||
console.log('3. Once you see the app page, the script will capture your token');
|
||||
console.log('');
|
||||
console.log('Starting browser...');
|
||||
console.log('');
|
||||
|
||||
await page.goto(PROD_URL);
|
||||
await page.waitForLoadState('networkidle');
|
||||
|
||||
// Wait for user to complete login (they should end up on /app)
|
||||
console.log('Waiting for you to log in...');
|
||||
console.log('(Complete beta enrollment or log in, then wait for /app page)');
|
||||
console.log('');
|
||||
|
||||
// Poll for login completion - user should end up on /app
|
||||
let loggedIn = false;
|
||||
let attempts = 0;
|
||||
const maxAttempts = 300; // 5 minutes at 1s intervals
|
||||
|
||||
while (!loggedIn && attempts < maxAttempts) {
|
||||
const url = page.url();
|
||||
|
||||
if (url.includes('/app')) {
|
||||
// Check if token is in localStorage
|
||||
const token = await page.evaluate(() =>
|
||||
localStorage.getItem('karaoke_access_token')
|
||||
);
|
||||
|
||||
if (token) {
|
||||
loggedIn = true;
|
||||
|
||||
console.log('========================================');
|
||||
console.log('TOKEN CAPTURED SUCCESSFULLY!');
|
||||
console.log('========================================');
|
||||
console.log('');
|
||||
console.log('Add this to your .env.local file:');
|
||||
console.log('');
|
||||
console.log(`KARAOKE_ACCESS_TOKEN=${token}`);
|
||||
console.log('');
|
||||
console.log('========================================');
|
||||
|
||||
// Verify the token works
|
||||
const response = await page.request.get('https://api.nomadkaraoke.com/api/users/me', {
|
||||
headers: { Authorization: `Bearer ${token}` }
|
||||
});
|
||||
|
||||
if (response.ok()) {
|
||||
const data = await response.json();
|
||||
const user = data.user || data;
|
||||
console.log(`Token verified for: ${user.email}`);
|
||||
console.log(`Credits available: ${user.credits}`);
|
||||
} else {
|
||||
console.log('Warning: Token verification failed, but it may still work');
|
||||
}
|
||||
|
||||
expect(token).toBeTruthy();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
await page.waitForTimeout(1000);
|
||||
attempts++;
|
||||
|
||||
if (attempts % 30 === 0) {
|
||||
console.log(`Still waiting... (${Math.round(attempts / 60)} min elapsed)`);
|
||||
}
|
||||
}
|
||||
|
||||
if (!loggedIn) {
|
||||
console.log('');
|
||||
console.log('Timeout - no token captured.');
|
||||
console.log('Make sure you completed login and reached the /app page.');
|
||||
expect(loggedIn).toBe(true);
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -49,35 +49,9 @@ export async function createEmailHelper(): Promise<EmailHelper> {
|
||||
* Create a new disposable inbox for testing
|
||||
*/
|
||||
async createInbox(): Promise<InboxDto> {
|
||||
try {
|
||||
const inbox = await mailslurp.createInbox();
|
||||
console.log(`Created test inbox: ${inbox.emailAddress}`);
|
||||
return inbox;
|
||||
} catch (error: any) {
|
||||
// Check for rate limit / subscription errors
|
||||
const errorMessage = error?.message || error?.toString() || '';
|
||||
const errorBody = error?.body ? JSON.stringify(error.body) : '';
|
||||
|
||||
if (
|
||||
errorMessage.includes('429') ||
|
||||
errorMessage.includes('limit') ||
|
||||
errorMessage.includes('subscription') ||
|
||||
errorMessage.includes('Upgrade') ||
|
||||
errorBody.includes('limit') ||
|
||||
errorBody.includes('Upgrade')
|
||||
) {
|
||||
throw new Error(
|
||||
`MailSlurp rate limit reached (free tier: 30 inboxes/month).\n\n` +
|
||||
`To continue testing, either:\n` +
|
||||
`1. Set KARAOKE_ACCESS_TOKEN in .env.local with a valid production token\n` +
|
||||
`2. Upgrade your MailSlurp account\n` +
|
||||
`3. Wait for the monthly limit to reset\n\n` +
|
||||
`To get a token: Log in manually at https://gen.nomadkaraoke.com, ` +
|
||||
`then run in browser console: localStorage.getItem('karaoke_access_token')`
|
||||
);
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
const inbox = await mailslurp.createInbox();
|
||||
console.log(`Created test inbox: ${inbox.emailAddress}`);
|
||||
return inbox;
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -22,7 +22,7 @@ import { createEmailHelper, isEmailTestingAvailable } from '../helpers/email-tes
|
||||
* 7. Lyrics Review - Preview and complete
|
||||
* 8. Instrumental Selection - Select clean instrumental
|
||||
* 9. Wait for Completion - Poll until done
|
||||
* 10. Verify Outputs - Check download URLs, YouTube, Dropbox
|
||||
* 10. Verify Outputs - Check download URLs
|
||||
*
|
||||
* Environment Variables:
|
||||
* - MAILSLURP_API_KEY: For email testing (required for full flow)
|
||||
@@ -47,8 +47,8 @@ const TIMEOUTS = {
|
||||
action: 30_000, // 30s for UI actions
|
||||
expect: 60_000, // 60s for assertions
|
||||
apiCall: 120_000, // 2min for API calls
|
||||
jobProcessing: 1200_000, // 20min for job processing (AI services can be slow)
|
||||
fullTest: 1800_000, // 30min for full test
|
||||
jobProcessing: 600_000, // 10min for job processing
|
||||
fullTest: 900_000, // 15min for full test
|
||||
} as const;
|
||||
|
||||
// =============================================================================
|
||||
@@ -73,73 +73,21 @@ async function pollJobStatus(
|
||||
timeoutMs: number = TIMEOUTS.jobProcessing
|
||||
): Promise<{ status: string; job: any }> {
|
||||
const startTime = Date.now();
|
||||
let lastLoggedProgress = '';
|
||||
|
||||
while (Date.now() - startTime < timeoutMs) {
|
||||
// Try to get job status with retry on timeout
|
||||
let response;
|
||||
for (let retryAttempt = 0; retryAttempt < 3; retryAttempt++) {
|
||||
try {
|
||||
response = await request.get(`${API_URL}/api/jobs/${jobId}`, {
|
||||
headers: { Authorization: `Bearer ${token}` },
|
||||
timeout: 30000, // 30s per attempt, retry if needed
|
||||
});
|
||||
break; // Success, exit retry loop
|
||||
} catch (error: any) {
|
||||
if (retryAttempt === 2) {
|
||||
// Last attempt failed, log and continue polling loop
|
||||
console.log(` WARNING: API request failed after 3 attempts: ${error.message}`);
|
||||
await new Promise((resolve) => setTimeout(resolve, 10000));
|
||||
continue;
|
||||
}
|
||||
// Wait before retry
|
||||
await new Promise((resolve) => setTimeout(resolve, 5000));
|
||||
}
|
||||
}
|
||||
const response = await request.get(`${API_URL}/api/jobs/${jobId}`, {
|
||||
headers: { Authorization: `Bearer ${token}` },
|
||||
timeout: TIMEOUTS.apiCall,
|
||||
});
|
||||
|
||||
if (response?.ok()) {
|
||||
if (response.ok()) {
|
||||
const job = await response.json();
|
||||
const stateData = job.state_data || {};
|
||||
|
||||
// Build progress info from state_data for better visibility
|
||||
const audioProgress = stateData.audio_progress?.stage || 'pending';
|
||||
const lyricsProgress = stateData.lyrics_progress?.stage || 'pending';
|
||||
const progressInfo = `${job.status} (audio: ${audioProgress}, lyrics: ${lyricsProgress})`;
|
||||
|
||||
// Only log when progress changes to reduce noise
|
||||
if (progressInfo !== lastLoggedProgress) {
|
||||
console.log(` Job ${jobId}: ${progressInfo}`);
|
||||
lastLoggedProgress = progressInfo;
|
||||
}
|
||||
console.log(` Job ${jobId}: ${job.status}`);
|
||||
|
||||
if (targetStatuses.includes(job.status)) {
|
||||
return { status: job.status, job };
|
||||
}
|
||||
|
||||
// Backend bug workaround: status field sometimes doesn't update,
|
||||
// but state_data has more accurate progress. Check for completion indicators.
|
||||
const hasReviewToken = !!job.review_token;
|
||||
const hasInstrumentalToken = !!job.instrumental_token;
|
||||
const lyricsComplete = stateData.lyrics_progress?.stage === 'complete';
|
||||
|
||||
// If we have review token, job is ready for review even if status is wrong
|
||||
if (hasReviewToken && targetStatuses.includes('in_review')) {
|
||||
console.log(` Job ${jobId}: has review token - treating as in_review`);
|
||||
return { status: 'in_review', job };
|
||||
}
|
||||
|
||||
// If we have instrumental token, job is ready for instrumental selection
|
||||
if (hasInstrumentalToken && targetStatuses.includes('awaiting_instrumental_selection')) {
|
||||
console.log(` Job ${jobId}: has instrumental token - treating as awaiting_instrumental_selection`);
|
||||
return { status: 'awaiting_instrumental_selection', job };
|
||||
}
|
||||
|
||||
// If download URLs are present, job is complete
|
||||
if (job.download_urls && Object.keys(job.download_urls).length > 0 && targetStatuses.includes('completed')) {
|
||||
console.log(` Job ${jobId}: has download URLs - treating as completed`);
|
||||
return { status: 'completed', job };
|
||||
}
|
||||
|
||||
if (job.status === 'failed') {
|
||||
throw new Error(`Job failed: ${job.error_message || 'Unknown error'}`);
|
||||
}
|
||||
@@ -180,55 +128,6 @@ async function findJobByArtistTitle(
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Wait for authenticated state in the UI (user email visible or no "Login" button)
|
||||
*/
|
||||
async function waitForAuthenticatedUI(page: Page, timeout: number = 30000): Promise<boolean> {
|
||||
const startTime = Date.now();
|
||||
while (Date.now() - startTime < timeout) {
|
||||
// Check if Login button is gone (user is logged in)
|
||||
const loginBtn = page.getByRole('button', { name: /^login$/i });
|
||||
const loginVisible = await loginBtn.isVisible().catch(() => false);
|
||||
|
||||
if (!loginVisible) {
|
||||
console.log(' UI shows authenticated state (no Login button)');
|
||||
return true;
|
||||
}
|
||||
|
||||
await page.waitForTimeout(1000);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify API token works and return user info
|
||||
*/
|
||||
async function verifyTokenAndGetUser(
|
||||
request: APIRequestContext,
|
||||
token: string
|
||||
): Promise<{ email: string; credits: number } | null> {
|
||||
const response = await request.get(`${API_URL}/api/users/me`, {
|
||||
headers: { Authorization: `Bearer ${token}` },
|
||||
timeout: TIMEOUTS.apiCall,
|
||||
});
|
||||
|
||||
if (response.ok()) {
|
||||
const data = await response.json();
|
||||
// API returns { user: { email, credits, role }, has_session: true }
|
||||
if (data.user) {
|
||||
return { email: data.user.email, credits: data.user.credits };
|
||||
}
|
||||
// Fallback for direct format
|
||||
if (data.email !== undefined) {
|
||||
return { email: data.email, credits: data.credits };
|
||||
}
|
||||
}
|
||||
|
||||
console.log(` API response status: ${response.status()}`);
|
||||
console.log(` API response: ${await response.text()}`);
|
||||
return null;
|
||||
}
|
||||
|
||||
// =============================================================================
|
||||
// TESTS
|
||||
// =============================================================================
|
||||
@@ -277,29 +176,18 @@ test.describe('Production E2E - Full User Journey', () => {
|
||||
|
||||
if (accessToken) {
|
||||
console.log(' Using existing KARAOKE_ACCESS_TOKEN');
|
||||
await authenticatePage(page, accessToken);
|
||||
|
||||
// Verify token is valid first
|
||||
const user = await verifyTokenAndGetUser(request, accessToken);
|
||||
if (!user) {
|
||||
console.log(' WARNING: Token invalid, will try email flow');
|
||||
accessToken = undefined;
|
||||
} else {
|
||||
console.log(` Token valid for: ${user.email} (${user.credits} credits)`);
|
||||
await authenticatePage(page, accessToken);
|
||||
// Navigate to app and verify authentication
|
||||
await page.goto(`${PROD_URL}/app`);
|
||||
await page.waitForLoadState('networkidle');
|
||||
|
||||
// Navigate to app and verify authentication
|
||||
await page.goto(`${PROD_URL}/app`);
|
||||
await page.waitForLoadState('networkidle');
|
||||
|
||||
// Should see the app, not be redirected to landing
|
||||
await expect(page.locator('h1')).toContainText('Karaoke Generator', {
|
||||
timeout: TIMEOUTS.expect,
|
||||
});
|
||||
console.log(' Authenticated successfully with existing token');
|
||||
}
|
||||
}
|
||||
|
||||
if (!accessToken && isEmailTestingAvailable()) {
|
||||
// Should see the app, not be redirected to landing
|
||||
await expect(page.locator('h1')).toContainText('Karaoke Generator', {
|
||||
timeout: TIMEOUTS.expect,
|
||||
});
|
||||
console.log(' Authenticated successfully with existing token');
|
||||
} else if (isEmailTestingAvailable()) {
|
||||
console.log(' Starting beta enrollment with MailSlurp');
|
||||
const emailHelper = await createEmailHelper();
|
||||
|
||||
@@ -319,7 +207,7 @@ test.describe('Production E2E - Full User Journey', () => {
|
||||
// Fill beta form
|
||||
await page.locator('#beta-email').fill(inbox.emailAddress!);
|
||||
await page.locator('textarea').fill(
|
||||
'E2E test enrollment - testing karaoke generation flow'
|
||||
'I want to create karaoke for my favorite indie songs! Testing the beta program.'
|
||||
);
|
||||
await page.locator('input[type="checkbox"]').check();
|
||||
|
||||
@@ -328,69 +216,37 @@ test.describe('Production E2E - Full User Journey', () => {
|
||||
// Submit form
|
||||
await page.getByRole('button', { name: /get my free credit/i }).click();
|
||||
|
||||
// Wait for success message and redirect
|
||||
console.log(' Waiting for enrollment success...');
|
||||
// Wait for success and redirect
|
||||
await expect(
|
||||
page.getByText(/welcome to the beta|redirecting|success/i)
|
||||
).toBeVisible({ timeout: 20000 });
|
||||
page.getByText(/welcome to the beta|redirecting to the app/i)
|
||||
).toBeVisible({ timeout: 15000 });
|
||||
|
||||
await page.waitForURL(/\/app/, { timeout: 15000 });
|
||||
await page.waitForURL(/\/app/, { timeout: 10000 });
|
||||
console.log(' Redirected to /app');
|
||||
|
||||
// Wait a moment for localStorage to be populated
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
// Get the token from localStorage
|
||||
accessToken = await page.evaluate(() =>
|
||||
localStorage.getItem('karaoke_access_token')
|
||||
) ?? undefined;
|
||||
|
||||
if (!accessToken) {
|
||||
// Debug: check what's in localStorage
|
||||
const allStorage = await page.evaluate(() => {
|
||||
const items: Record<string, string> = {};
|
||||
for (let i = 0; i < localStorage.length; i++) {
|
||||
const key = localStorage.key(i);
|
||||
if (key) items[key] = localStorage.getItem(key) || '';
|
||||
}
|
||||
return items;
|
||||
});
|
||||
console.log(' localStorage contents:', Object.keys(allStorage));
|
||||
throw new Error('No access token received after beta enrollment');
|
||||
}
|
||||
console.log(` Session token received: ${accessToken.substring(0, 20)}...`);
|
||||
console.log(' Session token received');
|
||||
|
||||
// Log full token for reuse in future test runs
|
||||
console.log('\n ========================================');
|
||||
console.log(' TOKEN FOR REUSE (add to .env.local):');
|
||||
console.log(` KARAOKE_ACCESS_TOKEN=${accessToken}`);
|
||||
console.log(' ========================================\n');
|
||||
|
||||
// IMPORTANT: Reload to ensure app picks up the new auth state
|
||||
console.log(' Reloading to refresh auth state...');
|
||||
await page.reload();
|
||||
await page.waitForLoadState('networkidle');
|
||||
|
||||
// Wait for authenticated UI state
|
||||
const isAuth = await waitForAuthenticatedUI(page, 10000);
|
||||
if (!isAuth) {
|
||||
console.log(' WARNING: UI still shows login button after reload');
|
||||
await page.screenshot({ path: 'test-results/02b-auth-issue.png' });
|
||||
}
|
||||
|
||||
// Verify welcome email (in parallel with continuing the test)
|
||||
// Verify welcome email
|
||||
console.log(' Waiting for welcome email...');
|
||||
const email = await emailHelper.waitForEmail(inbox.id!, 60000);
|
||||
console.log(` Email received: "${email.subject}"`);
|
||||
expect(email.subject).toMatch(/welcome.*beta|beta.*tester/i);
|
||||
|
||||
await page.screenshot({ path: 'test-results/02c-app-after-enrollment.png' });
|
||||
await page.screenshot({ path: 'test-results/02b-app-after-enrollment.png' });
|
||||
} finally {
|
||||
if (inbox.id) {
|
||||
await emailHelper.deleteInbox(inbox.id);
|
||||
}
|
||||
}
|
||||
} else if (!accessToken) {
|
||||
} else {
|
||||
throw new Error(
|
||||
'No KARAOKE_ACCESS_TOKEN and no MAILSLURP_API_KEY - cannot authenticate'
|
||||
);
|
||||
@@ -406,20 +262,22 @@ test.describe('Production E2E - Full User Journey', () => {
|
||||
console.log('========================================');
|
||||
|
||||
// Check user credits via API
|
||||
const user = await verifyTokenAndGetUser(request, accessToken!);
|
||||
if (user) {
|
||||
console.log(` Email: ${user.email}`);
|
||||
console.log(` Credits: ${user.credits}`);
|
||||
const userResponse = await request.get(`${API_URL}/api/users/me`, {
|
||||
headers: { Authorization: `Bearer ${accessToken}` },
|
||||
timeout: TIMEOUTS.apiCall,
|
||||
});
|
||||
|
||||
if (user.credits < 1) {
|
||||
console.log(' WARNING: No credits available, test may fail at job creation');
|
||||
if (userResponse.ok()) {
|
||||
const userData = await userResponse.json();
|
||||
console.log(` Credits: ${userData.credits}`);
|
||||
console.log(` Email: ${userData.email}`);
|
||||
|
||||
if (userData.credits < 1) {
|
||||
console.log(' WARNING: No credits available, test may fail');
|
||||
}
|
||||
} else {
|
||||
console.log(' WARNING: Could not verify user info');
|
||||
// Continue anyway - the token might still work for job creation
|
||||
}
|
||||
|
||||
console.log('STEP 3 COMPLETE: User verified');
|
||||
console.log('STEP 3 COMPLETE: User has credits');
|
||||
|
||||
// =========================================================================
|
||||
// STEP 4: Create Karaoke Job
|
||||
@@ -428,27 +286,16 @@ test.describe('Production E2E - Full User Journey', () => {
|
||||
console.log('STEP 4: Create Karaoke Job');
|
||||
console.log('========================================');
|
||||
|
||||
// Make sure we're on the app page with fresh state
|
||||
// Make sure we're on the app page
|
||||
if (!page.url().includes('/app')) {
|
||||
await page.goto(`${PROD_URL}/app`);
|
||||
await page.waitForLoadState('networkidle');
|
||||
}
|
||||
|
||||
// Verify we see the Search tab (authenticated state)
|
||||
const searchTab = page.getByRole('tab', { name: /search/i });
|
||||
await expect(searchTab).toBeVisible({ timeout: TIMEOUTS.expect });
|
||||
|
||||
// Navigate to Search tab
|
||||
await searchTab.click();
|
||||
await page.getByRole('tab', { name: /search/i }).click();
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
// Check for any error messages on the page
|
||||
const errorMessage = page.locator('[class*="error"], [class*="Error"], [role="alert"]');
|
||||
if (await errorMessage.count() > 0) {
|
||||
const errorText = await errorMessage.first().textContent();
|
||||
console.log(` Page error visible: ${errorText}`);
|
||||
}
|
||||
|
||||
// Select a theme if required
|
||||
const themeSelect = page.locator('button[role="combobox"]').first();
|
||||
if (await themeSelect.isVisible({ timeout: 3000 }).catch(() => false)) {
|
||||
@@ -462,110 +309,34 @@ test.describe('Production E2E - Full User Journey', () => {
|
||||
}
|
||||
}
|
||||
|
||||
// Fill artist and title using specific IDs (each tab has its own inputs)
|
||||
const artistInput = page.locator('#search-artist');
|
||||
const titleInput = page.locator('#search-title');
|
||||
|
||||
await expect(artistInput).toBeVisible({ timeout: TIMEOUTS.expect });
|
||||
await artistInput.clear();
|
||||
await artistInput.fill(TEST_SONG.artist);
|
||||
await titleInput.clear();
|
||||
await titleInput.fill(TEST_SONG.title);
|
||||
|
||||
// Verify values were set
|
||||
const artistValue = await artistInput.inputValue();
|
||||
const titleValue = await titleInput.inputValue();
|
||||
console.log(` Filled form: "${artistValue}" - "${titleValue}"`);
|
||||
// Fill artist and title
|
||||
await page.getByLabel('Artist').fill(TEST_SONG.artist);
|
||||
await page.getByLabel('Title').fill(TEST_SONG.title);
|
||||
console.log(` Searching for: ${TEST_SONG.artist} - ${TEST_SONG.title}`);
|
||||
|
||||
await page.screenshot({ path: 'test-results/04a-search-form.png' });
|
||||
|
||||
// Submit search via UI first, fall back to API if needed
|
||||
const searchButton = page.getByRole('button', { name: /search.*create/i });
|
||||
await expect(searchButton).toBeEnabled({ timeout: TIMEOUTS.expect });
|
||||
// Submit search
|
||||
await page.getByRole('button', { name: /search.*create/i }).click();
|
||||
|
||||
// Try clicking the button multiple times if needed
|
||||
for (let clickAttempt = 0; clickAttempt < 3; clickAttempt++) {
|
||||
console.log(` Click attempt ${clickAttempt + 1}/3...`);
|
||||
// Wait for job to be created
|
||||
console.log(' Waiting for search results...');
|
||||
await page.waitForTimeout(10000);
|
||||
|
||||
// Set up network monitoring
|
||||
const responsePromise = page.waitForResponse(
|
||||
(response) => response.url().includes('/api/audio-search/search'),
|
||||
{ timeout: 15000 }
|
||||
).catch(() => null);
|
||||
|
||||
// Click the button
|
||||
await searchButton.click({ force: true });
|
||||
|
||||
// Wait for response
|
||||
const response = await responsePromise;
|
||||
if (response && response.ok()) {
|
||||
try {
|
||||
const responseData = await response.json();
|
||||
if (responseData.job_id) {
|
||||
jobId = responseData.job_id;
|
||||
console.log(` Job created via UI: ${jobId}`);
|
||||
break;
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(` Response parse error: ${e}`);
|
||||
}
|
||||
}
|
||||
|
||||
// Wait before retry
|
||||
await page.waitForTimeout(2000);
|
||||
}
|
||||
|
||||
// If UI didn't work, create job via API directly
|
||||
if (!jobId) {
|
||||
console.log(' UI job creation failed, using API directly...');
|
||||
|
||||
const apiResponse = await request.post(`${API_URL}/api/audio-search/search`, {
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: `Bearer ${accessToken}`,
|
||||
},
|
||||
data: JSON.stringify({
|
||||
artist: TEST_SONG.artist,
|
||||
title: TEST_SONG.title,
|
||||
auto_download: false,
|
||||
}),
|
||||
timeout: 60000,
|
||||
});
|
||||
|
||||
if (apiResponse.ok()) {
|
||||
const apiData = await apiResponse.json();
|
||||
jobId = apiData.job_id;
|
||||
console.log(` Job created via API: ${jobId}`);
|
||||
} else {
|
||||
console.log(` API job creation failed: ${apiResponse.status()}`);
|
||||
console.log(` Error: ${await apiResponse.text()}`);
|
||||
}
|
||||
}
|
||||
|
||||
await page.screenshot({ path: 'test-results/04b-after-job-creation.png' });
|
||||
// Find our job
|
||||
jobId = await findJobByArtistTitle(
|
||||
request,
|
||||
TEST_SONG.artist,
|
||||
TEST_SONG.title,
|
||||
accessToken!
|
||||
);
|
||||
|
||||
if (!jobId) {
|
||||
// Debug: list all jobs
|
||||
const jobsResponse = await request.get(`${API_URL}/api/jobs`, {
|
||||
headers: { Authorization: `Bearer ${accessToken}` },
|
||||
});
|
||||
if (jobsResponse.ok()) {
|
||||
const jobsData = await jobsResponse.json();
|
||||
const jobs = jobsData.jobs || jobsData;
|
||||
console.log(` Total jobs found: ${jobs?.length || 0}`);
|
||||
if (Array.isArray(jobs)) {
|
||||
jobs.slice(0, 5).forEach((j: any) => {
|
||||
console.log(` - ${j.artist} - ${j.title} (${j.status})`);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
await page.screenshot({ path: 'test-results/04c-job-not-found.png' });
|
||||
throw new Error('Job not created after search');
|
||||
}
|
||||
console.log(` Job created: ${jobId}`);
|
||||
|
||||
await page.screenshot({ path: 'test-results/04d-job-created.png' });
|
||||
await page.screenshot({ path: 'test-results/04b-job-created.png' });
|
||||
console.log('STEP 4 COMPLETE: Job created');
|
||||
|
||||
// =========================================================================
|
||||
@@ -575,131 +346,45 @@ test.describe('Production E2E - Full User Journey', () => {
|
||||
console.log('STEP 5: Audio Selection');
|
||||
console.log('========================================');
|
||||
|
||||
// Refresh the jobs list to see our new job
|
||||
const refreshBtn = page.getByRole('button', { name: /refresh/i });
|
||||
await refreshBtn.click();
|
||||
console.log(' Clicked Refresh button');
|
||||
// Refresh the page to see updated job state
|
||||
await page.getByRole('button', { name: /refresh/i }).click().catch(() => {});
|
||||
await page.waitForTimeout(3000);
|
||||
|
||||
// Wait for job card to appear (it should show after refresh)
|
||||
let jobCardVisible = false;
|
||||
for (let i = 0; i < 10; i++) {
|
||||
// Look for job card containing our artist/title
|
||||
const jobCard = page.locator('[class*="job"], [data-testid*="job"]').first();
|
||||
const jobText = await page.locator('text=piri').first().isVisible().catch(() => false);
|
||||
|
||||
if (jobText) {
|
||||
console.log(' Job card found in list');
|
||||
jobCardVisible = true;
|
||||
break;
|
||||
}
|
||||
|
||||
console.log(` Waiting for job card (${i + 1}/10)...`);
|
||||
await refreshBtn.click().catch(() => {});
|
||||
await page.waitForTimeout(3000);
|
||||
}
|
||||
|
||||
await page.screenshot({ path: 'test-results/05a-jobs-list.png' });
|
||||
|
||||
// Now look for Select Audio button (might need to expand the job card first)
|
||||
let selectAudioBtn = page.getByRole('button', { name: /select audio/i }).first();
|
||||
|
||||
// If not visible, try clicking on the job to expand it
|
||||
if (!await selectAudioBtn.isVisible({ timeout: 5000 }).catch(() => false)) {
|
||||
// Try clicking on job title to expand
|
||||
const jobTitle = page.locator('text=piri').first();
|
||||
if (await jobTitle.isVisible().catch(() => false)) {
|
||||
console.log(' Clicking job title to expand...');
|
||||
await jobTitle.click();
|
||||
await page.waitForTimeout(2000);
|
||||
}
|
||||
}
|
||||
|
||||
selectAudioBtn = page.getByRole('button', { name: /select audio/i }).first();
|
||||
// Look for Select Audio button
|
||||
const selectAudioBtn = page.getByRole('button', { name: /select audio/i }).first();
|
||||
|
||||
if (await selectAudioBtn.isVisible({ timeout: 30000 }).catch(() => false)) {
|
||||
console.log(' Opening audio selection dialog...');
|
||||
await selectAudioBtn.click();
|
||||
await page.waitForTimeout(3000);
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
// Wait for dialog to appear
|
||||
const dialog = page.locator('[role="dialog"]');
|
||||
await expect(dialog).toBeVisible({ timeout: 10000 });
|
||||
await page.screenshot({ path: 'test-results/05b-audio-dialog.png' });
|
||||
if (await dialog.isVisible({ timeout: 5000 })) {
|
||||
await page.screenshot({ path: 'test-results/05a-audio-dialog.png' });
|
||||
|
||||
// Wait for audio results to load (may take a while)
|
||||
console.log(' Waiting for audio results to load...');
|
||||
await page.waitForTimeout(5000);
|
||||
// Find and click first Select button
|
||||
const selectButtons = dialog.getByRole('button', { name: /^select$/i });
|
||||
const count = await selectButtons.count();
|
||||
console.log(` Found ${count} audio options`);
|
||||
|
||||
// Find and click first Select button in the dialog
|
||||
const selectButtons = dialog.getByRole('button', { name: /^select$/i });
|
||||
const count = await selectButtons.count();
|
||||
console.log(` Found ${count} audio options`);
|
||||
|
||||
if (count > 0) {
|
||||
await selectButtons.first().click();
|
||||
console.log(' Audio selected, downloading...');
|
||||
|
||||
// Wait for dialog to close (download can take a while - up to 2 minutes)
|
||||
await dialog.waitFor({ state: 'hidden', timeout: TIMEOUTS.apiCall }).catch(() => {
|
||||
console.log(' Dialog still open after timeout - pressing Escape');
|
||||
return page.keyboard.press('Escape');
|
||||
});
|
||||
} else {
|
||||
// Maybe results are still loading, wait longer
|
||||
console.log(' No audio options yet, waiting longer...');
|
||||
await page.waitForTimeout(10000);
|
||||
const newCount = await selectButtons.count();
|
||||
console.log(` After waiting: ${newCount} audio options`);
|
||||
|
||||
if (newCount > 0) {
|
||||
if (count > 0) {
|
||||
await selectButtons.first().click();
|
||||
await dialog.waitFor({ state: 'hidden', timeout: TIMEOUTS.apiCall }).catch(() => {});
|
||||
console.log(' Audio selected, downloading...');
|
||||
|
||||
// Wait for dialog to close (download can take a while)
|
||||
await dialog.waitFor({ state: 'hidden', timeout: TIMEOUTS.apiCall }).catch(() => {
|
||||
console.log(' Dialog still open - pressing Escape');
|
||||
return page.keyboard.press('Escape');
|
||||
});
|
||||
} else {
|
||||
console.log(' WARNING: Still no audio options - check job logs');
|
||||
await page.screenshot({ path: 'test-results/05c-no-audio-options.png' });
|
||||
console.log(' WARNING: No audio options found');
|
||||
}
|
||||
}
|
||||
} else {
|
||||
console.log(' No "Select Audio" button found - trying API selection');
|
||||
|
||||
// Check job status via API
|
||||
const jobStatusResponse = await request.get(`${API_URL}/api/jobs/${jobId}`, {
|
||||
headers: { Authorization: `Bearer ${accessToken}` },
|
||||
});
|
||||
if (jobStatusResponse.ok()) {
|
||||
const jobData = await jobStatusResponse.json();
|
||||
console.log(` Job status: ${jobData.status}`);
|
||||
|
||||
// If job has audio results, select the first one via API
|
||||
if (jobData.status === 'awaiting_audio_selection' && jobData.state_data?.audio_search_results?.length > 0) {
|
||||
console.log(` Found ${jobData.state_data.audio_search_results.length} audio results via API`);
|
||||
console.log(' Selecting first audio result via API...');
|
||||
|
||||
const selectResponse = await request.post(`${API_URL}/api/audio-search/${jobId}/select`, {
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: `Bearer ${accessToken}`,
|
||||
},
|
||||
data: JSON.stringify({ selection_index: 0 }),
|
||||
timeout: 300000, // 5 minutes - audio download can take a while
|
||||
});
|
||||
|
||||
if (selectResponse.ok()) {
|
||||
console.log(' Audio selected via API successfully');
|
||||
const selectData = await selectResponse.json();
|
||||
console.log(` Selection response: ${JSON.stringify(selectData)}`);
|
||||
} else {
|
||||
console.log(` Audio selection failed: ${selectResponse.status()}`);
|
||||
console.log(` Error: ${await selectResponse.text()}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
await page.screenshot({ path: 'test-results/05d-after-api-select.png' });
|
||||
console.log(' No "Select Audio" button - job may have auto-selected or cached');
|
||||
}
|
||||
|
||||
await page.screenshot({ path: 'test-results/05e-after-audio.png' });
|
||||
await page.screenshot({ path: 'test-results/05b-after-audio.png' });
|
||||
console.log('STEP 5 COMPLETE: Audio selection handled');
|
||||
|
||||
// =========================================================================
|
||||
@@ -713,7 +398,7 @@ test.describe('Production E2E - Full User Journey', () => {
|
||||
const { status: statusAfterProcessing, job: jobAfterProcessing } = await pollJobStatus(
|
||||
request,
|
||||
jobId,
|
||||
['in_review', 'awaiting_review', 'generating_screens', 'awaiting_instrumental_selection', 'completed'],
|
||||
['in_review', 'awaiting_instrumental_selection', 'completed'],
|
||||
accessToken!
|
||||
);
|
||||
|
||||
@@ -726,22 +411,7 @@ test.describe('Production E2E - Full User Journey', () => {
|
||||
console.log('STEP 7: Lyrics Review');
|
||||
console.log('========================================');
|
||||
|
||||
// If still generating screens, wait for it to reach review state
|
||||
let reviewStatus = statusAfterProcessing;
|
||||
if (statusAfterProcessing === 'generating_screens') {
|
||||
console.log(' Waiting for screen generation to complete...');
|
||||
const { status: newStatus } = await pollJobStatus(
|
||||
request,
|
||||
jobId,
|
||||
['in_review', 'awaiting_review', 'awaiting_instrumental_selection', 'completed'],
|
||||
accessToken!,
|
||||
600000 // 10 minutes for screen generation
|
||||
);
|
||||
reviewStatus = newStatus;
|
||||
console.log(` Status transitioned to: ${reviewStatus}`);
|
||||
}
|
||||
|
||||
if (reviewStatus === 'in_review' || reviewStatus === 'awaiting_review') {
|
||||
if (statusAfterProcessing === 'in_review') {
|
||||
await page.reload();
|
||||
await page.waitForLoadState('networkidle');
|
||||
|
||||
@@ -787,7 +457,7 @@ test.describe('Production E2E - Full User Journey', () => {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
console.log(` Skipping - job status is ${reviewStatus}`);
|
||||
console.log(` Skipping - job status is ${statusAfterProcessing}`);
|
||||
}
|
||||
|
||||
console.log('STEP 7 COMPLETE: Lyrics review handled');
|
||||
@@ -864,8 +534,8 @@ test.describe('Production E2E - Full User Journey', () => {
|
||||
|
||||
console.log(` Theme ID: ${finalJob.theme_id || 'N/A'}`);
|
||||
console.log(` YouTube URL: ${finalJob.youtube_url || 'N/A'}`);
|
||||
console.log(` Dropbox URL: ${finalJob.dropbox_url || finalJob.state_data?.dropbox_link || 'N/A'}`);
|
||||
console.log(` Google Drive: ${finalJob.gdrive_url || finalJob.state_data?.gdrive_files?.length || 'N/A'}`);
|
||||
console.log(` Dropbox URL: ${finalJob.dropbox_url || 'N/A'}`);
|
||||
console.log(` Google Drive URL: ${finalJob.gdrive_url || 'N/A'}`);
|
||||
|
||||
// Verify required outputs
|
||||
expect(finalJob.theme_id).toBeTruthy();
|
||||
@@ -879,23 +549,6 @@ test.describe('Production E2E - Full User Journey', () => {
|
||||
if (downloadResponse?.ok()) {
|
||||
const downloadUrls = await downloadResponse.json();
|
||||
console.log(` Download URLs available: ${Object.keys(downloadUrls).length}`);
|
||||
Object.entries(downloadUrls).forEach(([key, value]) => {
|
||||
console.log(` - ${key}: ${value ? 'Available' : 'Missing'}`);
|
||||
});
|
||||
}
|
||||
|
||||
// Verify YouTube upload if URL exists
|
||||
if (finalJob.youtube_url) {
|
||||
console.log(` Verifying YouTube URL: ${finalJob.youtube_url}`);
|
||||
// Just verify the URL format is valid
|
||||
expect(finalJob.youtube_url).toMatch(/youtube\.com|youtu\.be/);
|
||||
}
|
||||
|
||||
// Verify Dropbox link if exists
|
||||
const dropboxLink = finalJob.dropbox_url || finalJob.state_data?.dropbox_link;
|
||||
if (dropboxLink) {
|
||||
console.log(` Verifying Dropbox URL: ${dropboxLink}`);
|
||||
expect(dropboxLink).toMatch(/dropbox\.com/);
|
||||
}
|
||||
|
||||
await page.reload();
|
||||
@@ -911,8 +564,6 @@ test.describe('Production E2E - Full User Journey', () => {
|
||||
console.log('========================================');
|
||||
console.log(`Job ID: ${jobId}`);
|
||||
console.log(`Final Status: ${finalStatus}`);
|
||||
console.log(`YouTube: ${finalJob.youtube_url || 'Not uploaded'}`);
|
||||
console.log(`Dropbox: ${dropboxLink || 'Not uploaded'}`);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "karaoke-gen-frontend",
|
||||
"version": "0.77.0",
|
||||
"version": "0.78.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "next build",
|
||||
|
||||
File renamed without changes.
@@ -699,6 +699,37 @@ sendgrid_api_key = secretmanager.Secret(
|
||||
),
|
||||
)
|
||||
|
||||
# ==================== Langfuse Observability Secrets ====================
|
||||
# Langfuse provides LLM observability for the agentic AI correction workflow.
|
||||
# These secrets enable tracing of all Vertex AI/LLM calls for debugging and monitoring.
|
||||
|
||||
# Langfuse Public Key (for client identification)
|
||||
langfuse_public_key = secretmanager.Secret(
|
||||
"langfuse-public-key",
|
||||
secret_id="langfuse-public-key",
|
||||
replication=secretmanager.SecretReplicationArgs(
|
||||
auto=secretmanager.SecretReplicationAutoArgs(),
|
||||
),
|
||||
)
|
||||
|
||||
# Langfuse Secret Key (for authentication)
|
||||
langfuse_secret_key = secretmanager.Secret(
|
||||
"langfuse-secret-key",
|
||||
secret_id="langfuse-secret-key",
|
||||
replication=secretmanager.SecretReplicationArgs(
|
||||
auto=secretmanager.SecretReplicationAutoArgs(),
|
||||
),
|
||||
)
|
||||
|
||||
# Langfuse Host (API endpoint - US region)
|
||||
langfuse_host = secretmanager.Secret(
|
||||
"langfuse-host",
|
||||
secret_id="langfuse-host",
|
||||
replication=secretmanager.SecretReplicationArgs(
|
||||
auto=secretmanager.SecretReplicationAutoArgs(),
|
||||
),
|
||||
)
|
||||
|
||||
# Create Cloud Run Domain Mapping
|
||||
# Maps api.nomadkaraoke.com to the karaoke-backend service
|
||||
domain_mapping = cloudrun.DomainMapping(
|
||||
|
||||
+1
@@ -224,6 +224,7 @@ class ModelFactory:
|
||||
model=model_name,
|
||||
project=config.gcp_project_id,
|
||||
location=config.gcp_location,
|
||||
timeout=config.request_timeout_seconds,
|
||||
max_retries=config.max_retries,
|
||||
callbacks=callbacks,
|
||||
)
|
||||
|
||||
Generated
+936
-19
File diff suppressed because it is too large.
Load diff
@@ -55,7 +55,7 @@ langchain-core = ">=0.3.0"
|
||||
langchain-openai = ">=0.2.0"
|
||||
langchain-anthropic = ">=0.2.0"
|
||||
langchain-ollama = ">=0.2.0"
|
||||
langchain-google-vertexai = ">=2.0.0"
|
||||
langchain-google-vertexai = ">=3.1.1"
|
||||
langfuse = ">=3.0.0"
|
||||
pydantic = ">=2.7.0"
|
||||
jiwer = ">=3.0.0"
|
||||
|
||||
Generated
+29
-29
@@ -2206,8 +2206,8 @@ grpcio-status = [
|
||||
{version = ">=1.33.2,<2.0.0", optional = true, markers = "extra == \"grpc\""},
|
||||
]
|
||||
proto-plus = [
|
||||
{version = ">=1.25.0,<2.0.0", markers = "python_version >= \"3.13\""},
|
||||
{version = ">=1.22.3,<2.0.0"},
|
||||
{version = ">=1.25.0,<2.0.0", markers = "python_version >= \"3.13\""},
|
||||
]
|
||||
protobuf = ">=3.19.5,<3.20.0 || >3.20.0,<3.20.1 || >3.20.1,<4.21.0 || >4.21.0,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<7.0.0"
|
||||
requests = ">=2.18.0,<3.0.0"
|
||||
@@ -2320,8 +2320,8 @@ google-auth = ">=2.45.0,<3.0.0"
|
||||
google-cloud-bigquery = ">=1.15.0,<3.20.0 || >3.20.0,<4.0.0"
|
||||
google-cloud-resource-manager = ">=1.3.3,<3.0.0"
|
||||
google-cloud-storage = [
|
||||
{version = ">=2.10.0,<4.0.0", markers = "python_version >= \"3.13\""},
|
||||
{version = ">=1.32.0,<4.0.0", markers = "python_version < \"3.13\""},
|
||||
{version = ">=2.10.0,<4.0.0", markers = "python_version >= \"3.13\""},
|
||||
]
|
||||
google-genai = ">=1.37.0,<2.0.0"
|
||||
packaging = ">=14.3"
|
||||
@@ -2429,9 +2429,9 @@ google-api-core = {version = ">=1.34.0,<2.0.dev0 || >=2.11.dev0,<3.0.0", extras
|
||||
google-auth = ">=2.14.1,<2.24.0 || >2.24.0,<2.25.0 || >2.25.0,<3.0.0"
|
||||
google-cloud-core = ">=1.4.1,<3.0.0"
|
||||
proto-plus = [
|
||||
{version = ">=1.25.0,<2.0.0", markers = "python_version >= \"3.13\""},
|
||||
{version = ">=1.22.2,<2.0.0", markers = "python_version >= \"3.11\""},
|
||||
{version = ">=1.22.0,<2.0.0"},
|
||||
{version = ">=1.25.0,<2.0.0", markers = "python_version >= \"3.13\""},
|
||||
]
|
||||
protobuf = ">=3.20.2,<4.21.0 || >4.21.0,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<7.0.0dev"
|
||||
|
||||
@@ -2453,8 +2453,8 @@ google-auth = ">=2.14.1,<2.24.0 || >2.24.0,<2.25.0 || >2.25.0,<3.0.0"
|
||||
grpc-google-iam-v1 = ">=0.14.0,<1.0.0"
|
||||
grpcio = ">=1.33.2,<2.0.0"
|
||||
proto-plus = [
|
||||
{version = ">=1.25.0,<2.0.0", markers = "python_version >= \"3.13\""},
|
||||
{version = ">=1.22.3,<2.0.0"},
|
||||
{version = ">=1.25.0,<2.0.0", markers = "python_version >= \"3.13\""},
|
||||
]
|
||||
protobuf = ">=3.20.2,<4.21.0 || >4.21.0,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<7.0.0"
|
||||
|
||||
@@ -2476,8 +2476,8 @@ google-auth = ">=2.14.1,<2.24.0 || >2.24.0,<2.25.0 || >2.25.0,<3.0.0"
|
||||
grpc-google-iam-v1 = ">=0.14.0,<1.0.0"
|
||||
grpcio = ">=1.33.2,<2.0.0"
|
||||
proto-plus = [
|
||||
{version = ">=1.22.3,<2.0.0"},
|
||||
{version = ">=1.25.0,<2.0.0", markers = "python_version >= \"3.13\""},
|
||||
{version = ">=1.22.3,<2.0.0", markers = "python_version < \"3.13\""},
|
||||
]
|
||||
protobuf = ">=3.20.2,<4.21.0 || >4.21.0,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<7.0.0"
|
||||
|
||||
@@ -2499,8 +2499,8 @@ google-auth = ">=2.14.1,<2.24.0 || >2.24.0,<2.25.0 || >2.25.0,<3.0.0"
|
||||
grpc-google-iam-v1 = ">=0.14.0,<1.0.0"
|
||||
grpcio = ">=1.33.2,<2.0.0"
|
||||
proto-plus = [
|
||||
{version = ">=1.25.0,<2.0.0", markers = "python_version >= \"3.13\""},
|
||||
{version = ">=1.22.3,<2.0.0"},
|
||||
{version = ">=1.25.0,<2.0.0", markers = "python_version >= \"3.13\""},
|
||||
]
|
||||
protobuf = ">=3.20.2,<4.21.0 || >4.21.0,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<7.0.0"
|
||||
|
||||
@@ -2547,8 +2547,8 @@ google-auth = ">=2.14.1,<2.24.0 || >2.24.0,<2.25.0 || >2.25.0,<3.0.0"
|
||||
grpc-google-iam-v1 = ">=0.14.0,<1.0.0"
|
||||
grpcio = ">=1.33.2,<2.0.0"
|
||||
proto-plus = [
|
||||
{version = ">=1.25.0,<2.0.0", markers = "python_version >= \"3.13\""},
|
||||
{version = ">=1.22.3,<2.0.0"},
|
||||
{version = ">=1.25.0,<2.0.0", markers = "python_version >= \"3.13\""},
|
||||
]
|
||||
protobuf = ">=3.20.2,<4.21.0 || >4.21.0,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<7.0.0"
|
||||
|
||||
@@ -2569,8 +2569,8 @@ google-api-core = {version = ">=1.34.1,<2.0.dev0 || >=2.11.dev0,<3.0.0", extras
|
||||
google-auth = ">=2.14.1,<2.24.0 || >2.24.0,<2.25.0 || >2.25.0,<3.0.0"
|
||||
grpcio = ">=1.33.2,<2.0.0"
|
||||
proto-plus = [
|
||||
{version = ">=1.25.0,<2.0.0", markers = "python_version >= \"3.13\""},
|
||||
{version = ">=1.22.3,<2.0.0"},
|
||||
{version = ">=1.25.0,<2.0.0", markers = "python_version >= \"3.13\""},
|
||||
]
|
||||
protobuf = ">=3.20.2,<4.21.0 || >4.21.0,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<7.0.0"
|
||||
|
||||
@@ -4504,10 +4504,10 @@ files = [
|
||||
|
||||
[package.dependencies]
|
||||
numpy = [
|
||||
{version = ">=2.1.0", markers = "python_version >= \"3.13\""},
|
||||
{version = ">=1.26.0", markers = "python_version >= \"3.12\""},
|
||||
{version = ">=1.23.3", markers = "python_version >= \"3.11\""},
|
||||
{version = ">=1.21.2", markers = "python_version >= \"3.10\""},
|
||||
{version = ">=2.1.0", markers = "python_version >= \"3.13\""},
|
||||
]
|
||||
|
||||
[package.extras]
|
||||
@@ -5090,7 +5090,7 @@ description = "CUBLAS native runtime libraries"
|
||||
optional = false
|
||||
python-versions = ">=3"
|
||||
groups = ["main"]
|
||||
markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
|
||||
markers = "platform_machine == \"x86_64\" and platform_system == \"Linux\""
|
||||
files = [
|
||||
{file = "nvidia_cublas_cu12-12.8.4.1-py3-none-manylinux_2_27_aarch64.whl", hash = "sha256:b86f6dd8935884615a0683b663891d43781b819ac4f2ba2b0c9604676af346d0"},
|
||||
{file = "nvidia_cublas_cu12-12.8.4.1-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:8ac4e771d5a348c551b2a426eda6193c19aa630236b418086020df5ba9667142"},
|
||||
@@ -5104,7 +5104,7 @@ description = "CUDA profiling tools runtime libs."
|
||||
optional = false
|
||||
python-versions = ">=3"
|
||||
groups = ["main"]
|
||||
markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
|
||||
markers = "platform_machine == \"x86_64\" and platform_system == \"Linux\""
|
||||
files = [
|
||||
{file = "nvidia_cuda_cupti_cu12-12.8.90-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:4412396548808ddfed3f17a467b104ba7751e6b58678a4b840675c56d21cf7ed"},
|
||||
{file = "nvidia_cuda_cupti_cu12-12.8.90-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ea0cb07ebda26bb9b29ba82cda34849e73c166c18162d3913575b0c9db9a6182"},
|
||||
@@ -5118,7 +5118,7 @@ description = "NVRTC native runtime libraries"
|
||||
optional = false
|
||||
python-versions = ">=3"
|
||||
groups = ["main"]
|
||||
markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
|
||||
markers = "platform_machine == \"x86_64\" and platform_system == \"Linux\""
|
||||
files = [
|
||||
{file = "nvidia_cuda_nvrtc_cu12-12.8.93-py3-none-manylinux2010_x86_64.manylinux_2_12_x86_64.whl", hash = "sha256:a7756528852ef889772a84c6cd89d41dfa74667e24cca16bb31f8f061e3e9994"},
|
||||
{file = "nvidia_cuda_nvrtc_cu12-12.8.93-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:fc1fec1e1637854b4c0a65fb9a8346b51dd9ee69e61ebaccc82058441f15bce8"},
|
||||
@@ -5132,7 +5132,7 @@ description = "CUDA Runtime native Libraries"
|
||||
optional = false
|
||||
python-versions = ">=3"
|
||||
groups = ["main"]
|
||||
markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
|
||||
markers = "platform_machine == \"x86_64\" and platform_system == \"Linux\""
|
||||
files = [
|
||||
{file = "nvidia_cuda_runtime_cu12-12.8.90-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:52bf7bbee900262ffefe5e9d5a2a69a30d97e2bc5bb6cc866688caa976966e3d"},
|
||||
{file = "nvidia_cuda_runtime_cu12-12.8.90-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:adade8dcbd0edf427b7204d480d6066d33902cab2a4707dcfc48a2d0fd44ab90"},
|
||||
@@ -5146,7 +5146,7 @@ description = "cuDNN runtime libraries"
|
||||
optional = false
|
||||
python-versions = ">=3"
|
||||
groups = ["main"]
|
||||
markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
|
||||
markers = "platform_machine == \"x86_64\" and platform_system == \"Linux\""
|
||||
files = [
|
||||
{file = "nvidia_cudnn_cu12-9.10.2.21-py3-none-manylinux_2_27_aarch64.whl", hash = "sha256:c9132cc3f8958447b4910a1720036d9eff5928cc3179b0a51fb6d167c6cc87d8"},
|
||||
{file = "nvidia_cudnn_cu12-9.10.2.21-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:949452be657fa16687d0930933f032835951ef0892b37d2d53824d1a84dc97a8"},
|
||||
@@ -5163,7 +5163,7 @@ description = "CUFFT native runtime libraries"
|
||||
optional = false
|
||||
python-versions = ">=3"
|
||||
groups = ["main"]
|
||||
markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
|
||||
markers = "platform_machine == \"x86_64\" and platform_system == \"Linux\""
|
||||
files = [
|
||||
{file = "nvidia_cufft_cu12-11.3.3.83-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:848ef7224d6305cdb2a4df928759dca7b1201874787083b6e7550dd6765ce69a"},
|
||||
{file = "nvidia_cufft_cu12-11.3.3.83-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:4d2dd21ec0b88cf61b62e6b43564355e5222e4a3fb394cac0db101f2dd0d4f74"},
|
||||
@@ -5180,7 +5180,7 @@ description = "cuFile GPUDirect libraries"
|
||||
optional = false
|
||||
python-versions = ">=3"
|
||||
groups = ["main"]
|
||||
markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
|
||||
markers = "platform_machine == \"x86_64\" and platform_system == \"Linux\""
|
||||
files = [
|
||||
{file = "nvidia_cufile_cu12-1.13.1.3-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1d069003be650e131b21c932ec3d8969c1715379251f8d23a1860554b1cb24fc"},
|
||||
{file = "nvidia_cufile_cu12-1.13.1.3-py3-none-manylinux_2_27_aarch64.whl", hash = "sha256:4beb6d4cce47c1a0f1013d72e02b0994730359e17801d395bdcbf20cfb3bb00a"},
|
||||
@@ -5193,7 +5193,7 @@ description = "CURAND native runtime libraries"
|
||||
optional = false
|
||||
python-versions = ">=3"
|
||||
groups = ["main"]
|
||||
markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
|
||||
markers = "platform_machine == \"x86_64\" and platform_system == \"Linux\""
|
||||
files = [
|
||||
{file = "nvidia_curand_cu12-10.3.9.90-py3-none-manylinux_2_27_aarch64.whl", hash = "sha256:dfab99248034673b779bc6decafdc3404a8a6f502462201f2f31f11354204acd"},
|
||||
{file = "nvidia_curand_cu12-10.3.9.90-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:b32331d4f4df5d6eefa0554c565b626c7216f87a06a4f56fab27c3b68a830ec9"},
|
||||
@@ -5207,7 +5207,7 @@ description = "CUDA solver native runtime libraries"
|
||||
optional = false
|
||||
python-versions = ">=3"
|
||||
groups = ["main"]
|
||||
markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
|
||||
markers = "platform_machine == \"x86_64\" and platform_system == \"Linux\""
|
||||
files = [
|
||||
{file = "nvidia_cusolver_cu12-11.7.3.90-py3-none-manylinux_2_27_aarch64.whl", hash = "sha256:db9ed69dbef9715071232caa9b69c52ac7de3a95773c2db65bdba85916e4e5c0"},
|
||||
{file = "nvidia_cusolver_cu12-11.7.3.90-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:4376c11ad263152bd50ea295c05370360776f8c3427b30991df774f9fb26c450"},
|
||||
@@ -5226,7 +5226,7 @@ description = "CUSPARSE native runtime libraries"
|
||||
optional = false
|
||||
python-versions = ">=3"
|
||||
groups = ["main"]
|
||||
markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
|
||||
markers = "platform_machine == \"x86_64\" and platform_system == \"Linux\""
|
||||
files = [
|
||||
{file = "nvidia_cusparse_cu12-12.5.8.93-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:9b6c161cb130be1a07a27ea6923df8141f3c295852f4b260c65f18f3e0a091dc"},
|
||||
{file = "nvidia_cusparse_cu12-12.5.8.93-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1ec05d76bbbd8b61b06a80e1eaf8cf4959c3d4ce8e711b65ebd0443bb0ebb13b"},
|
||||
@@ -5243,7 +5243,7 @@ description = "NVIDIA cuSPARSELt"
|
||||
optional = false
|
||||
python-versions = "*"
|
||||
groups = ["main"]
|
||||
markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
|
||||
markers = "platform_machine == \"x86_64\" and platform_system == \"Linux\""
|
||||
files = [
|
||||
{file = "nvidia_cusparselt_cu12-0.7.1-py3-none-manylinux2014_aarch64.whl", hash = "sha256:8878dce784d0fac90131b6817b607e803c36e629ba34dc5b433471382196b6a5"},
|
||||
{file = "nvidia_cusparselt_cu12-0.7.1-py3-none-manylinux2014_x86_64.whl", hash = "sha256:f1bb701d6b930d5a7cea44c19ceb973311500847f81b634d802b7b539dc55623"},
|
||||
@@ -5257,7 +5257,7 @@ description = "NVIDIA Collective Communication Library (NCCL) Runtime"
|
||||
optional = false
|
||||
python-versions = ">=3"
|
||||
groups = ["main"]
|
||||
markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
|
||||
markers = "platform_machine == \"x86_64\" and platform_system == \"Linux\""
|
||||
files = [
|
||||
{file = "nvidia_nccl_cu12-2.27.5-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:31432ad4d1fb1004eb0c56203dc9bc2178a1ba69d1d9e02d64a6938ab5e40e7a"},
|
||||
{file = "nvidia_nccl_cu12-2.27.5-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ad730cf15cb5d25fe849c6e6ca9eb5b76db16a80f13f425ac68d8e2e55624457"},
|
||||
@@ -5270,7 +5270,7 @@ description = "Nvidia JIT LTO Library"
|
||||
optional = false
|
||||
python-versions = ">=3"
|
||||
groups = ["main"]
|
||||
markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
|
||||
markers = "platform_machine == \"x86_64\" and platform_system == \"Linux\""
|
||||
files = [
|
||||
{file = "nvidia_nvjitlink_cu12-12.8.93-py3-none-manylinux2010_x86_64.manylinux_2_12_x86_64.whl", hash = "sha256:81ff63371a7ebd6e6451970684f916be2eab07321b73c9d244dc2b4da7f73b88"},
|
||||
{file = "nvidia_nvjitlink_cu12-12.8.93-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:adccd7161ace7261e01bb91e44e88da350895c270d23f744f0820c818b7229e7"},
|
||||
@@ -5284,7 +5284,7 @@ description = "NVSHMEM creates a global address space that provides efficient an
|
||||
optional = false
|
||||
python-versions = ">=3"
|
||||
groups = ["main"]
|
||||
markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
|
||||
markers = "platform_machine == \"x86_64\" and platform_system == \"Linux\""
|
||||
files = [
|
||||
{file = "nvidia_nvshmem_cu12-3.3.20-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:0b0b960da3842212758e4fa4696b94f129090b30e5122fea3c5345916545cff0"},
|
||||
{file = "nvidia_nvshmem_cu12-3.3.20-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:d00f26d3f9b2e3c3065be895e3059d6479ea5c638a3f38c9fec49b1b9dd7c1e5"},
|
||||
@@ -5297,7 +5297,7 @@ description = "NVIDIA Tools Extension"
|
||||
optional = false
|
||||
python-versions = ">=3"
|
||||
groups = ["main"]
|
||||
markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
|
||||
markers = "platform_machine == \"x86_64\" and platform_system == \"Linux\""
|
||||
files = [
|
||||
{file = "nvidia_nvtx_cu12-12.8.90-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d7ad891da111ebafbf7e015d34879f7112832fc239ff0d7d776b6cb685274615"},
|
||||
{file = "nvidia_nvtx_cu12-12.8.90-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:5b17e2001cc0d751a5bc2c6ec6d26ad95913324a4adb86788c944f8ce9ba441f"},
|
||||
@@ -6512,7 +6512,7 @@ files = [
|
||||
{file = "pycparser-2.23-py3-none-any.whl", hash = "sha256:e5c6e8d3fbad53479cab09ac03729e0a9faf2bee3db8208a550daf5af81a5934"},
|
||||
{file = "pycparser-2.23.tar.gz", hash = "sha256:78816d4f24add8f10a06d6f05b4d424ad9e96cfebf68a4ddc99c65c0720d00c2"},
|
||||
]
|
||||
markers = {main = "implementation_name != \"PyPy\"", dev = "implementation_name != \"PyPy\" and (platform_python_implementation != \"PyPy\" or sys_platform == \"darwin\") and (sys_platform == \"linux\" or sys_platform == \"darwin\")"}
|
||||
markers = {main = "implementation_name != \"PyPy\"", dev = "(platform_python_implementation != \"PyPy\" or sys_platform == \"darwin\") and implementation_name != \"PyPy\" and (sys_platform == \"linux\" or sys_platform == \"darwin\")"}
|
||||
|
||||
[[package]]
|
||||
name = "pydantic"
|
||||
@@ -9174,7 +9174,7 @@ description = "A language and compiler for custom Deep Learning operations"
|
||||
optional = false
|
||||
python-versions = "<3.15,>=3.10"
|
||||
groups = ["main"]
|
||||
markers = "(platform_machine == \"x86_64\" or sys_platform == \"linux2\") and (platform_system == \"Linux\" or sys_platform == \"linux\" or sys_platform == \"linux2\") and (platform_system == \"Linux\" or extra == \"local-whisper\") and (platform_machine == \"x86_64\" or extra == \"local-whisper\")"
|
||||
markers = "(platform_system == \"Linux\" or sys_platform == \"linux\" or sys_platform == \"linux2\") and (platform_system == \"Linux\" or extra == \"local-whisper\") and (platform_machine == \"x86_64\" or extra == \"local-whisper\") and (platform_machine == \"x86_64\" or sys_platform == \"linux2\")"
|
||||
files = [
|
||||
{file = "triton-3.5.1-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f63e34dcb32d7bd3a1d0195f60f30d2aee8b08a69a0424189b71017e23dfc3d2"},
|
||||
{file = "triton-3.5.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5fc53d849f879911ea13f4a877243afc513187bc7ee92d1f2c0f1ba3169e3c94"},
|
||||
@@ -9383,7 +9383,7 @@ description = "Fast implementation of asyncio event loop on top of libuv"
|
||||
optional = false
|
||||
python-versions = ">=3.8.1"
|
||||
groups = ["main"]
|
||||
markers = "sys_platform != \"win32\" and sys_platform != \"cygwin\" and platform_python_implementation != \"PyPy\""
|
||||
markers = "platform_python_implementation != \"PyPy\" and sys_platform != \"win32\" and sys_platform != \"cygwin\""
|
||||
files = [
|
||||
{file = "uvloop-0.22.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:ef6f0d4cc8a9fa1f6a910230cd53545d9a14479311e87e3cb225495952eb672c"},
|
||||
{file = "uvloop-0.22.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7cd375a12b71d33d46af85a3343b35d98e8116134ba404bd657b3b1d15988792"},
|
||||
@@ -9766,7 +9766,7 @@ description = "Enable Unicode input and display when running Python from Windows
|
||||
optional = false
|
||||
python-versions = "*"
|
||||
groups = ["main"]
|
||||
markers = "platform_system == \"Windows\" and platform_python_implementation != \"PyPy\""
|
||||
markers = "platform_python_implementation != \"PyPy\" and platform_system == \"Windows\""
|
||||
files = [
|
||||
{file = "win_unicode_console-0.5.zip", hash = "sha256:d4142d4d56d46f449d6f00536a73625a871cba040f0bc1a2e305a04578f07d1e"},
|
||||
]
|
||||
@@ -10264,4 +10264,4 @@ local-whisper = ["whisper-timestamped"]
|
||||
[metadata]
|
||||
lock-version = "2.1"
|
||||
python-versions = ">=3.10,<3.14"
|
||||
content-hash = "bb2fca188c47ea8cee84d752853fd7b2f05401e752f5e16e12921dea0691bd8e"
|
||||
content-hash = "8fc2a24adfdbabac044f1e2dcdc0869682ea2b99418e1a3ad3e5e11f30d6f76d"
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "karaoke-gen"
|
||||
version = "0.81.2"
|
||||
version = "0.81.3"
|
||||
description = "Generate karaoke videos with synchronized lyrics. Handles the entire process from downloading audio and lyrics to creating the final video with title screens."
|
||||
authors = ["Andrew Beveridge <andrew@beveridge.uk>"]
|
||||
license = "MIT"
|
||||
@@ -66,7 +66,7 @@ langchain-core = ">=0.3.0"
|
||||
langchain-openai = ">=0.2.0"
|
||||
langchain-anthropic = ">=0.2.0"
|
||||
langchain-ollama = ">=0.2.0"
|
||||
langchain-google-vertexai = ">=2.0.0"
|
||||
langchain-google-vertexai = ">=3.1.1"
|
||||
langfuse = ">=3.0.0"
|
||||
jiwer = ">=3.0.0"
|
||||
kbputils = "^0.0.16"
|
||||
|
||||
Reference in new issue
Block a user