Skip to content

Commit 925a3c6

Browse files
committed
Fix CI failures for rejection classification and CDC payload tests
1 parent 384f737 commit 925a3c6

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

__tests__/workers/cdc/primary.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3267,8 +3267,10 @@ describe('post content updated', () => {
32673267
{
32683268
banned: false,
32693269
canonicalUrl: 'http://p4c.com',
3270+
content: undefined,
32703271
contentCuration: ['c1', 'c2'],
32713272
contentMeta: {
3273+
channels: [],
32723274
cleaned: [
32733275
{
32743276
provider: 'test',
@@ -3323,6 +3325,7 @@ describe('post content updated', () => {
33233325
type: 'COLLECTION',
33243326
},
33253327
],
3328+
sharedPostId: undefined,
33263329
source: {
33273330
active: true,
33283331
color: 'avocado',
@@ -3373,10 +3376,17 @@ describe('post content updated', () => {
33733376
'api.v1.content-updated',
33743377
{
33753378
banned: false,
3379+
canonicalUrl: undefined,
33763380
content: 'Freeform content',
33773381
contentCuration: ['c1', 'c2'],
33783382
contentMeta: {
3383+
aigcDetect: undefined,
3384+
channels: [],
33793385
cleaned: [],
3386+
embedding: undefined,
3387+
enriched: undefined,
3388+
language: undefined,
3389+
scraped: undefined,
33803390
storedCodeSnippets: '',
33813391
},
33823392
contentQuality: {
@@ -3411,6 +3421,7 @@ describe('post content updated', () => {
34113421
type: 'COLLECTION',
34123422
},
34133423
],
3424+
sharedPostId: undefined,
34143425
source: {
34153426
active: true,
34163427
color: 'avocado',
@@ -3508,10 +3519,17 @@ describe('post content updated', () => {
35083519
'api.v1.content-updated',
35093520
{
35103521
banned: false,
3522+
canonicalUrl: undefined,
35113523
content: 'Collection content',
35123524
contentCuration: ['c1', 'c2'],
35133525
contentMeta: {
3526+
aigcDetect: undefined,
3527+
channels: [],
35143528
cleaned: [],
3529+
embedding: undefined,
3530+
enriched: undefined,
3531+
language: undefined,
3532+
scraped: undefined,
35153533
storedCodeSnippets: '',
35163534
},
35173535
contentQuality: {
@@ -3546,6 +3564,7 @@ describe('post content updated', () => {
35463564
type: 'COLLECTION',
35473565
},
35483566
],
3567+
sharedPostId: undefined,
35493568
source: {
35503569
active: true,
35513570
createdAt: expect.any(Number),
@@ -3591,9 +3610,17 @@ describe('post content updated', () => {
35913610
'api.v1.content-updated',
35923611
{
35933612
banned: false,
3613+
canonicalUrl: undefined,
3614+
content: undefined,
35943615
contentCuration: ['c1', 'c2'],
35953616
contentMeta: {
3617+
aigcDetect: undefined,
3618+
channels: [],
35963619
cleaned: [],
3620+
embedding: undefined,
3621+
enriched: undefined,
3622+
language: undefined,
3623+
scraped: undefined,
35973624
storedCodeSnippets: '',
35983625
},
35993626
contentQuality: {
@@ -3628,6 +3655,7 @@ describe('post content updated', () => {
36283655
type: 'COLLECTION',
36293656
},
36303657
],
3658+
sharedPostId: undefined,
36313659
source: {
36323660
active: true,
36333661
color: 'avocado',

src/workers/opportunity/parseOpportunityFeedback.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,14 @@ const parseOpportunityFeedback = async ({
9494
'Successfully parsed opportunity feedback',
9595
);
9696

97+
if (match.rejectionClassification) {
98+
logger.debug(
99+
{ opportunityId, userId },
100+
'Rejection feedback already classified',
101+
);
102+
return;
103+
}
104+
97105
try {
98106
const feedback = match.feedback
99107
.map((item) => `Q: ${item.screening}\nA: ${item.answer}`)

0 commit comments

Comments
 (0)