fix(review): stop recomputing the type label on review-family webhooks - #4987
Conversation
pull_request_review/_comment/_thread events can never change a PR's title or its linked-issue list -- the only two inputs the type-label decision depends on -- yet each was still reaching the recompute with its own independently stale embedded PR snapshot, which is exactly the mechanism #4818 exploited. Exclude all three event families from the type-label block entirely rather than continuing to patch individually-discovered staleness paths; a genuine change is still caught by the next pull_request-native event or the sweep. Closes #4986
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4987 +/- ##
=======================================
Coverage 94.31% 94.32%
=======================================
Files 455 455
Lines 39083 39086 +3
Branches 14256 14258 +2
=======================================
+ Hits 36862 36867 +5
+ Misses 1572 1570 -2
Partials 649 649
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-11 07:33:36 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 3 non-blocking
Concerns raised — review before merging
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.
|
Summary
pull_request_review,pull_request_review_comment, andpull_request_review_threadwebhooks from the type-label recompute entirely. None of the three can ever change a PR's title or its linked-issue list — the only two inputs the label decision depends on — yet each was still reaching the recompute with its own independently-stale embedded PR snapshot, which is the exact mechanism feat(ui): confidence-calibration curve card on the analytics dashboard (#2192) #4818 exploited. fix(review): resolve an ambiguous null prMergedAt with a live recheck before downgrading a label #4980 fixed the one discovered symptom of that staleness (an ambiguous nullprMergedAt); this shrinks the risk surface structurally so future not-yet-discovered staleness paths in these three event types can't reach the decision at all, rather than continuing to patch each one as it's found.pull_request-native event (opened/reopened/synchronize/ready_for_review/edited/closed) or the periodic sweep — bounded delay, not a lost update.undefined-omits-the-column upsert convention), not a webhook snapshot;/pulls/{n}//issues/{n}reads are excluded from both the response cache and unsafe single-flight coalescing; exactly one code path writes these labels anywhere insrc/.Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #4986).Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocallynpm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateIf any required check was skipped, explain why:
test:coverage(full unsharded): not run end-to-end locally — ran scopedvitest --coveragefortest/unit/queue-2.test.ts+test/unit/queue-5.test.ts(the two files that exercise this code path) and confirmed via lcov that every line/branch touched by this diff is covered (the one remaining 0-hit line in the surrounding function is a pre-existing, untouchedcatchblock, not part of this change). Also rannpm run test:changed: 7949 tests passed. CI's owncodecov/patchrun is authoritative for the final number.test:workers/build:mcp/test:mcp-pack/ui:openapi:check/ui:lint/ui:typecheck/ui:build: not run — this change touches onlysrc/queue/processors.tsand its test file, no UI/MCP/Worker-pool/OpenAPI-surface changes.Safety
UI Evidencesection. (N/A — no UI changes.)Notes