Skip to content

fix(signals): group contributor open PRs by repo case-insensitively#1527

Open
galuis116 wants to merge 2 commits into
JSONbored:mainfrom
galuis116:fix/open-pr-monitor-repo-case
Open

fix(signals): group contributor open PRs by repo case-insensitively#1527
galuis116 wants to merge 2 commits into
JSONbored:mainfrom
galuis116:fix/open-pr-monitor-repo-case

Conversation

@galuis116

Copy link
Copy Markdown
Contributor

Summary

Fixes #1526.

groupByRepo in buildContributorOpenPrMonitor bucketed a contributor's open PRs by the raw pr.repoFullName, while every other repo-name operation in the same function is case-insensitive (the registered-repo set, the open-PR filter, the repo lookup). GitHub repo names are case-insensitive, so case-variant repoFullName values for one repo split into separate groups — under-counting per-repo open PRs, running duplicate detection only within each partial group, and querying listPullRequests once per casing.

What changed

  • groupByRepo now keys buckets on pr.repoFullName.toLowerCase(), matching the function's own repo-name handling.
  • The consumer loop derives the canonical repoFullName from a bucket's first PR (its original casing) for the case-sensitive per-repo DB queries — the established key-by-lower / keep-original pattern used in contributor-evidence-graph.ts.

Scope

Validation

  • git diff --check
  • npm run typecheck
  • npm run test:coverage locally (4619 passed); the new grouping lines are covered by a case-variant test, and the existing same-casing tests are unchanged.
  • npm run test:workers
  • npm audit --audit-level=moderate
  • New unit test: two open PRs for one repo under different casings group together and the case-sensitive query never runs against the case-variant.

If any required check was skipped, explain why:

  • OpenAPI/types/migrations unchanged — internal grouping only; the monitor's output shape is identical.

Safety

  • No secrets, wallets, hotkeys, PATs, trust scores, or private evidence exposed.
  • Public text sanitized and low-noise (monitor output sanitizer test still passes).
  • No auth/CORS/session change.
  • API/OpenAPI/MCP behavior unchanged.
  • No UI changes.
  • No changelog edit.

Notes

  • Confined to src/signals/contributor-open-pr-monitor.ts; mirrors the case-insensitive repo handling already present in the same function and in contributor-evidence-graph.ts.

@galuis116 galuis116 requested a review from JSONbored as a code owner June 26, 2026 13:22
@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jun 26, 2026
@superagent-security

Copy link
Copy Markdown

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

@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.38%. Comparing base (b5d575e) to head (fd87ed5).
⚠️ Report is 6 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1527   +/-   ##
=======================================
  Coverage   95.37%   95.38%           
=======================================
  Files         199      199           
  Lines       21546    21548    +2     
  Branches     7791     7791           
=======================================
+ Hits        20550    20554    +4     
  Misses        416      416           
+ Partials      580      578    -2     
Files with missing lines Coverage Δ
src/signals/contributor-open-pr-monitor.ts 98.11% <100.00%> (+1.95%) ⬆️
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JSONbored JSONbored added the gittensor:bug Gittensor-scored bug fix - worth 0.5x multiplier. label Jun 26, 2026
@gittensory-orb

gittensory-orb Bot commented Jun 27, 2026

Copy link
Copy Markdown

Caution

🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥

🛑 Gittensory review — blocked

2 files · 1 AI reviewers · no blockers · readiness 55/100 · CI failing · blocked

🛑 Blocked

CI checks failing

  • validate
  • lint
Signal Result Evidence
Code review ✅ No blockers 1 reviewers, synthesized
Linked issue ✅ Linked #1526
Related work ⚠️ 2 scoped overlaps Top overlaps are listed below; lower-confidence bulk is hidden.
Review load ❌ 8/20 Readiness component derived from cached public PR metadata and labels; size label size:S.
Validation evidence ❌ 5/25 Cached preflight status is hold.
Open PR queue ❌ 3/10 48 open PR(s), 9 likely reviewable, 39 unlinked.
Contributor context ✅ Confirmed Gittensor contributor galuis116; Gittensor profile; 785 PR(s), 154 issue(s).
Gate result ✅ Passing No configured blocker found.
Nits — 1 non-blocking
  • Repository config was not parsed
Review context
Contributor next steps
  • Review top overlaps.
  • Add scope summary.
  • Fix blocker.
  • Expect slower review.
  • Refresh registry data or choose a registered active repo.
  • Check active issues and PRs before submitting.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Review load = cached public PR metadata such as size labels, changed paths, and preflight status.
  • Open PR queue = repo-wide review pressure; it is not a PR quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.

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

  • Re-run Gittensory review

@gittensory-orb gittensory-orb Bot added the gittensor Gittensor contributor context label Jun 27, 2026
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 - worth 0.5x multiplier. gittensor Gittensor contributor context size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: contributor open-PR monitor groups PRs by case-sensitive repoFullName, splitting one repo into two

2 participants