From 4507c82c347075317d15b8097855bd3fec8a129c Mon Sep 17 00:00:00 2001 From: Jonathanchang31 <55106972+jonathanchang31@users.noreply.github.com> Date: Wed, 13 May 2026 22:38:15 +0200 Subject: [PATCH 1/2] fix: allowing unknown solvers through mirror solved-issue pipeline --- packages/das/src/api/miners/miners.service.ts | 1 + packages/das/src/webhook/github-fetcher.service.ts | 5 ++++- packages/db/26_normalize_blank_pr_author_ids.sql | 7 +++++++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 packages/db/26_normalize_blank_pr_author_ids.sql diff --git a/packages/das/src/api/miners/miners.service.ts b/packages/das/src/api/miners/miners.service.ts index 180953f..801d01b 100644 --- a/packages/das/src/api/miners/miners.service.ts +++ b/packages/das/src/api/miners/miners.service.ts @@ -202,6 +202,7 @@ export class MinersService { AND sp.pr_number = i.solved_by_pr -- Skip null-author solving PRs (no one to credit) AND sp.author_github_id IS NOT NULL + AND BTRIM(sp.author_github_id) <> '' -- Skip corrupted MERGED-without-merged_at shape AND NOT (sp.state = 'MERGED' AND sp.merged_at IS NULL) ) AS solving_pr diff --git a/packages/das/src/webhook/github-fetcher.service.ts b/packages/das/src/webhook/github-fetcher.service.ts index 88ad900..2ea4cda 100644 --- a/packages/das/src/webhook/github-fetcher.service.ts +++ b/packages/das/src/webhook/github-fetcher.service.ts @@ -784,7 +784,10 @@ export class GitHubFetcherService implements OnModuleInit { { repoFullName, prNumber: pr.number, - authorGithubId: String(pr.author?.databaseId ?? ""), + authorGithubId: + pr.author?.databaseId != null + ? String(pr.author.databaseId) + : null, authorLogin: pr.author?.login ?? null, authorAssociation: pr.authorAssociation ?? null, title: pr.title, diff --git a/packages/db/26_normalize_blank_pr_author_ids.sql b/packages/db/26_normalize_blank_pr_author_ids.sql new file mode 100644 index 0000000..3be1cd0 --- /dev/null +++ b/packages/db/26_normalize_blank_pr_author_ids.sql @@ -0,0 +1,7 @@ +-- Normalize legacy bad rows where unknown PR author IDs were stored as blanks. +-- Unknown author identity must be NULL so solver-credit filters can exclude it. + +UPDATE pull_requests +SET author_github_id = NULL +WHERE author_github_id IS NOT NULL + AND BTRIM(author_github_id) = ''; From b5af2f142adaaf5cb7081ca78e646a3eca379492 Mon Sep 17 00:00:00 2001 From: Jonathanchang31 <55106972+jonathanchang31@users.noreply.github.com> Date: Fri, 22 May 2026 15:46:51 +0200 Subject: [PATCH 2/2] fix: code change after review --- packages/das/src/webhook/github-fetcher.service.ts | 5 +---- packages/db/26_normalize_blank_pr_author_ids.sql | 7 ------- 2 files changed, 1 insertion(+), 11 deletions(-) delete mode 100644 packages/db/26_normalize_blank_pr_author_ids.sql diff --git a/packages/das/src/webhook/github-fetcher.service.ts b/packages/das/src/webhook/github-fetcher.service.ts index 2ea4cda..88ad900 100644 --- a/packages/das/src/webhook/github-fetcher.service.ts +++ b/packages/das/src/webhook/github-fetcher.service.ts @@ -784,10 +784,7 @@ export class GitHubFetcherService implements OnModuleInit { { repoFullName, prNumber: pr.number, - authorGithubId: - pr.author?.databaseId != null - ? String(pr.author.databaseId) - : null, + authorGithubId: String(pr.author?.databaseId ?? ""), authorLogin: pr.author?.login ?? null, authorAssociation: pr.authorAssociation ?? null, title: pr.title, diff --git a/packages/db/26_normalize_blank_pr_author_ids.sql b/packages/db/26_normalize_blank_pr_author_ids.sql deleted file mode 100644 index 3be1cd0..0000000 --- a/packages/db/26_normalize_blank_pr_author_ids.sql +++ /dev/null @@ -1,7 +0,0 @@ --- Normalize legacy bad rows where unknown PR author IDs were stored as blanks. --- Unknown author identity must be NULL so solver-credit filters can exclude it. - -UPDATE pull_requests -SET author_github_id = NULL -WHERE author_github_id IS NOT NULL - AND BTRIM(author_github_id) = '';