fix(predicted-gate): limit the duplicate check to open siblings#1522
Open
Dexterity104 wants to merge 2 commits into
Open
fix(predicted-gate): limit the duplicate check to open siblings#1522Dexterity104 wants to merge 2 commits into
Dexterity104 wants to merge 2 commits into
Conversation
|
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 #1522 +/- ##
=======================================
Coverage 95.37% 95.37%
=======================================
Files 199 199
Lines 21546 21547 +1
Branches 7791 7791
=======================================
+ Hits 20550 20551 +1
Misses 416 416
Partials 580 580
🚀 New features to boost your workflow:
|
|
Caution 🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥 🛑 Gittensory review — blocked
🛑 Blocked CI checks failing
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.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The pre-submission gate predictor passed the full pull request snapshot into the duplicate detector. That snapshot comes from
listPullRequests, which has no state filter, so closed and merged pull requests that shared a linked issue were treated as live competitors and raisedduplicate_pr_risk. That finding blocks by default, so a contributor saw a predicted failure for a pull request the real gate would pass.Every other gate path already compares against open siblings only: the live gate through
listOtherOpenPullRequests, and the maintainer activation preview through an explicitstate === "open"filter. The predictor now filters the snapshot to open siblings before building the advisory, which restores that parity and keeps the busy queue count honest.authorHistorystill reads the full snapshot, because the first contribution grace counts depend on merged and closed rows.A regression test places a merged sibling and a closed sibling that both share the linked issue, then asserts that no
duplicate_pr_riskblocker appears in the predicted verdict.Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally;codecov/patchneeds at least 97% of the changed lines and branches, and the changed lines here measure 100%.npm 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:
src/rules/predicted-gate.tsand its unit test. No workflow, Cloudflare Worker, MCP package, or UI surface is affected, soactionlint,test:workers,build:mcp,test:mcp-pack, theui:*suite, andnpm auditare left for the fullnpm run test:cirun before push.Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails.UI Evidence
Not applicable. This change has no visible UI, frontend, docs, or extension surface.
Notes