Skip to content

Commit 6abbce9

Browse files
committed
fix: treat generic AI detections as non-game in backfill
When AI fallback returns generic platform/engine terms (e.g. srcds, source dedicated server, steamcmd), treat them as non-game detections instead of logging them as unmapped games. Also prompt the model to return null for generic terms.
1 parent 0b18264 commit 6abbce9

1 file changed

Lines changed: 28 additions & 4 deletions

File tree

.github/workflows/labeler.yml

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,6 +1011,22 @@ jobs:
10111011
return {};
10121012
}
10131013
1014+
function isGenericNonGameDetection(value) {
1015+
const normalized = normalizeName(value);
1016+
if (!normalized) return false;
1017+
1018+
return [
1019+
'srcds',
1020+
'source dedicated server',
1021+
'dedicated server',
1022+
'source engine',
1023+
'goldsrc',
1024+
'steamcmd',
1025+
'linuxgsm',
1026+
'lgsm',
1027+
].some((term) => normalized.includes(term));
1028+
}
1029+
10141030
function hasAliasHitForLabel(text, targetLabel, gameAliasToLabel) {
10151031
const normalizedText = normalizeName(text);
10161032
if (!normalizedText || !targetLabel) return false;
@@ -1366,7 +1382,9 @@ jobs:
13661382
messages: [
13671383
{
13681384
role: 'system',
1369-
content: 'Return JSON only. Identify the game referenced in this LinuxGSM issue with high precision.',
1385+
content:
1386+
'Return JSON only. Identify the specific game referenced in this LinuxGSM issue with high precision. ' +
1387+
'If only generic platform/engine terms are present (e.g. srcds, source dedicated server, steamcmd), return detected_game as null.',
13701388
},
13711389
{
13721390
role: 'user',
@@ -1424,9 +1442,15 @@ jobs:
14241442
);
14251443
}
14261444
} else {
1427-
console.log(
1428-
`#${rawIssue.number}: AI fallback returned unmapped game "${parsed?.detected_game}"`
1429-
);
1445+
if (isGenericNonGameDetection(parsed?.detected_game || '')) {
1446+
console.log(
1447+
`#${rawIssue.number}: AI fallback skipped generic non-game detection "${parsed?.detected_game}"`
1448+
);
1449+
} else {
1450+
console.log(
1451+
`#${rawIssue.number}: AI fallback returned unmapped game "${parsed?.detected_game}"`
1452+
);
1453+
}
14301454
}
14311455
}
14321456
} else {

0 commit comments

Comments
 (0)