chore: open conversion flow + disable scout import noise
Some checks failed
Deploy to 110 WOOO Server / deploy (push) Failing after 8s

This commit is contained in:
OG T
2026-06-07 18:56:45 +08:00
parent 4f639c2654
commit 4fd89a447e
10 changed files with 423 additions and 117 deletions

View File

@@ -12,6 +12,13 @@ function asRecordJson(value: unknown): Record<string, unknown> | undefined {
return undefined;
}
function normalizedJudgeResult(value: unknown) {
if (typeof value !== "string") {
return "";
}
return value.trim().toLowerCase();
}
function isMissingTableError(error: unknown): boolean {
return (
typeof error === "object" &&
@@ -199,11 +206,11 @@ export async function GET(request: NextRequest) {
const submitEvents = actionSummary["EXTERNAL_SUBMIT_SOLUTION_SUCCESS"] || 0;
const judgePassEvents = judgeCompleteRows.filter((row) => {
const metadata = asRecordJson(row.metadata);
return metadata?.overall_result === "PASS";
return normalizedJudgeResult(metadata?.overall_result) === "pass";
}).length;
const judgeFailEvents = judgeCompleteRows.filter((row) => {
const metadata = asRecordJson(row.metadata);
return metadata?.overall_result === "FAIL";
return normalizedJudgeResult(metadata?.overall_result) === "fail";
}).length;
const conversionRate = (numerator: number, denominator: number) => {