test(selfhost): cover jobCoalesceKey missing-field fallbacks for 6 job types - #5862
Conversation
…b types Fixes JSONbored#5850. jobCoalesceKey's '?? "<fallback>"' arms — taken when a payload omits an optional field so the job still coalesces to a stable key instead of null — were untested for the backfill/refresh/rollup job types. Adds a case asserting the exact fallback key for backfill-registered-repos, backfill-repo-segment, backfill-pr-details, generate-review-recap, refresh-contributor-activity, and rollup-product-usage when their optional fields are absent.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-14 20:23:33 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 2 non-blocking
Linked issue satisfactionPartially addressed Review context
Contributor next steps
Signal definitions
[BETA] Chat with GittensoryAsk Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Fixes #5850.
jobCoalesceKey(src/selfhost/queue-common.ts) maps a job payload to a coalesce key. For several job types it fills a missing optional field with a literal fallback token (normalizedX(...) ?? "<fallback>") so the job still coalesces to a stable slot instead of null-ing (and duplicating). Those fallback arms had no direct coverage.Test-only (no production change): adds one case asserting the exact fallback key when the optional fields are absent, for six job types:
backfill-registered-repos→…:all:default:0backfill-repo-segment→…:unknown:unknown:default:0:startbackfill-pr-details→…:unknown:default:startgenerate-review-recap→…:allrefresh-contributor-activity→…:unknown:allrollup-product-usage→…:latest:defaultAll 85 tests in the file pass; typecheck clean.