Skip to content

fix(signals): compare local branch repo names case-insensitively#965

Merged
JSONbored merged 3 commits into
mainfrom
codex/fix-case-sensitive-repo-scoping-issue
Jun 21, 2026
Merged

fix(signals): compare local branch repo names case-insensitively#965
JSONbored merged 3 commits into
mainfrom
codex/fix-case-sensitive-repo-scoping-issue

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Motivation

  • A recent change scoped open-PR pressure counting with a case-sensitive repo equality check, which causes same-repo open PRs to be missed when the caller- or git-derived repoFullName uses different casing.

Description

  • Replace strict === repoFullName comparison with the existing case-insensitive sameRepo() helper in src/signals/local-branch.ts when computing contributorOpenPrCount.
  • Add a regression unit test in test/unit/local-branch.test.ts that exercises differently-cased repoFullName and contributor login values to ensure same-repo open PRs are counted and pressure guidance recommends cleanup first.

Testing

  • Ran the unit test file with npm test -- --run test/unit/local-branch.test.ts, and all tests passed (44 passed).
  • Ran type checking with npm run typecheck (tsc --noEmit), which completed without errors.

Codex Task

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

ghost commented Jun 20, 2026

Copy link
Copy Markdown

🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

✅ Maintainer review — Ready to merge

Reviewed 2 changed file(s) — two independent AI reviewers, synthesized. ✅ Safe to merge — both reviewers found no blocking issues.

Summary

The change correctly introduces case‑insensitive repository name comparison using the existing sameRepo helper, fixing a bug where contributor open‑PR counts were missed when repo name case differed. The added unit test validates the new behavior. No security concerns are introduced, and the modification improves maintainability. All existing tests continue to pass and the new test covers the edge case.

💡 Nits — non-blocking, optional

  • Consider adding a brief comment explaining why sameRepo is used here for future readers.
  • If sameRepo is not already imported in this file, add the appropriate import statement to avoid a ReferenceError.
  • Consider adding a brief comment explaining why sameRepo is used here for clarity.

@ghost ghost added the reviewbot-review label Jun 20, 2026
@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 #965 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
@superagent-security

Copy link
Copy Markdown
Contributor

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

@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.64%. Comparing base (c585389) to head (7f2f3f7).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #965   +/-   ##
=======================================
  Coverage   96.64%   96.64%           
=======================================
  Files         110      110           
  Lines       15033    15033           
  Branches     5432     5432           
=======================================
  Hits        14528    14528           
  Misses        104      104           
  Partials      401      401           

☔ 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 self-assigned this Jun 20, 2026

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommend close (rejected) — held for your decision

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Held for maintainer (guardrail_area) — correct + CI green

@JSONbored
JSONbored merged commit afbe222 into main Jun 21, 2026
20 checks passed
@JSONbored
JSONbored deleted the codex/fix-case-sensitive-repo-scoping-issue branch June 21, 2026 03:04
@github-actions github-actions Bot mentioned this pull request Jun 21, 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