fix(queue): guard terminal PR resync races - #2460
Conversation
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-02 04:51:22 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 2 non-blocking
Review context
Contributor next steps
Signal definitions
🟩 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 Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2460 +/- ##
=======================================
Coverage 95.80% 95.80%
=======================================
Files 224 224
Lines 24970 24972 +2
Branches 9075 9076 +1
=======================================
+ Hits 23922 23924 +2
Misses 428 428
Partials 620 620
🚀 New features to boost your workflow:
|
Motivation
Description
reReviewStoredPullRequestthat re-reads the stored PR and only callsupsertPullRequestFromGitHubfor a live non-open payload if the stored row is stillopenand itsupdatedAtmatches the job's snapshot.src/queue/processors.ts,test/unit/queue.test.ts.Testing
npx vitest run test/unit/queue.test.ts -t "regate-terminal-exit"and the targeted unit tests passed.npm run typecheckandgit diff --check, both succeeded.npm run test:coveragewith coverage enabled and the global coverage thresholds for the whole repo failed (expected given the focused unit change and repo-wide thresholds), so full coverage gate remains unsharded and must be green before pushing.npm run test:ciandnpm audit --audit-level=moderatebut both were blocked by environmental/network issues (actionlint runner-label resolution and npm audit 403), not by the change itself.Codex Task