Skip to content

fix(signals): scope open PR pressure count to repo - #939

Merged
JSONbored merged 2 commits into
mainfrom
codex/propose-fix-for-contributor-pr-counting-issue
Jun 20, 2026
Merged

fix(signals): scope open PR pressure count to repo#939
JSONbored merged 2 commits into
mainfrom
codex/propose-fix-for-contributor-pr-counting-issue

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Motivation

  • The open-PR pressure simulation counted contributor PRs across all repositories when contributorPullRequests was supplied, which could make local-branch guidance treat cross-repo PRs as if they belonged to the repository under analysis.

Description

  • Filter contributorPullRequests by pr.repoFullName === args.input.repoFullName before counting open PRs in buildLocalBranchAnalysis (src/signals/local-branch.ts).
  • Add a regression test that supplies an open PR in a different repo and asserts the pressure options still recommend opening new work for the current low-pressure repo (test/unit/local-branch.test.ts).

Testing

  • Ran the targeted unit tests with npm test -- --run test/unit/local-branch.test.ts; all tests passed (43/43).
  • Ran type checking with npm run typecheck; it completed successfully.

Codex Task

@dosubot dosubot Bot added the size:XS label Jun 20, 2026
@ghost ghost added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jun 20, 2026
@ghost

ghost commented Jun 20, 2026

Copy link
Copy Markdown

🔍 Maintainer review

Reviewed 2 file(s) — ✅ all CI green.

Suggested action:Safe to merge — both reviewers found no blocking issues.

Reviewer A · gpt-oss-120b — recommends ✅ merge
The patch correctly scopes the contributorOpenPrCount to the current repository, fixing over‑counting of open PR pressure. No security concerns are introduced, and the added unit test validates the new behavior. The change is straightforward, well‑documented, and does not break existing functionality.

Suggestions

  • Verify that other parts of the scoring pipeline that use contributorOpenPrCount still behave as intended with the scoped count.
  • Consider adding a comment explaining why the repo filter is required for future maintainers.

Worth double-checking

  • If other signal calculations relied on a global open‑PR count, they may now receive lower values, potentially altering their recommendations.

Reviewer B · nemotron-3-120b-a12b — recommends ✅ merge
The change correctly scopes contributor open PR count to the same repository by adding a repoFullName check. The new test validates that cross-repo PRs are ignored, ensuring accurate queue pressure calculation. No security, public/private boundary, or maintainability concerns detected.

No blocking issues spotted.

@ghost ghost added the reviewbot-review label Jun 20, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@ghost

ghost commented Jun 20, 2026

Copy link
Copy Markdown

Note

Gittensory Gate skipped

PR closed before full evaluation. No late first comment was created.

Signal Result Evidence Action
Gate result ⚠️ Skipped #939 is no longer open. No action.

💰 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.

@ghost ghost added the gittensory:reviewed label Jun 20, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 20, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
gittensory-ui 019c4be Commit Preview URL

Branch Preview URL
Jun 20 2026, 04:34 PM

@codecov

codecov Bot commented Jun 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.62%. Comparing base (ec0b69b) to head (019c4be).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #939   +/-   ##
=======================================
  Coverage   96.62%   96.62%           
=======================================
  Files         110      110           
  Lines       14997    14997           
  Branches     5419     5419           
=======================================
  Hits        14491    14491           
  Misses        104      104           
  Partials      402      402           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JSONbored
JSONbored merged commit 9cbdc6a into main Jun 20, 2026
21 checks passed
@JSONbored
JSONbored deleted the codex/propose-fix-for-contributor-pr-counting-issue branch June 20, 2026 16:39
@JSONbored JSONbored self-assigned this Jun 20, 2026
@github-actions github-actions Bot mentioned this pull request Jun 20, 2026
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant