feat(cv)!: queue durable processing
CV upload now returns 202 with an owner-scoped operation instead of holding the request through parsing. Existing review approval remains required. BREAKING CHANGE: profile-cv upload responses use the durable operation contract.
This commit is contained in:
@@ -284,6 +284,37 @@ test('profile page can reprocess from stored artifact history', async () => {
|
||||
});
|
||||
});
|
||||
|
||||
test('profile page shows durable CV operation state and retries a failed run', async () => {
|
||||
extractionRunsResponse = [{
|
||||
id: 14,
|
||||
trigger: 'upload',
|
||||
status: 'queued',
|
||||
artifactFileName: 'synthetic-cv.md',
|
||||
startedAtUtc: '2026-03-28T12:00:00Z',
|
||||
parserVersion: 'm005-s01',
|
||||
normalizerVersion: 'm005-s01',
|
||||
llmPromptVersion: 'm005-s01',
|
||||
operation: {
|
||||
id: '00000000-0000-0000-0000-000000000014',
|
||||
taskType: 'cv.process',
|
||||
status: 'failed',
|
||||
subjectType: 'cv_extraction_run',
|
||||
createdAtUtc: '2026-03-28T12:00:00Z',
|
||||
failureCategory: 'provider_unavailable',
|
||||
canCancel: false,
|
||||
canRetry: true,
|
||||
},
|
||||
}];
|
||||
renderPage();
|
||||
|
||||
expect(await screen.findByText('failed')).toBeInTheDocument();
|
||||
fireEvent.click(screen.getByRole('button', { name: /retry processing/i }));
|
||||
|
||||
await waitFor(() => {
|
||||
expect(mockedApi.post).toHaveBeenCalledWith('/operations/00000000-0000-0000-0000-000000000014/retry');
|
||||
});
|
||||
});
|
||||
|
||||
test('profile page keeps raw extraction collapsed until expanded', async () => {
|
||||
renderPage();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user