Skip to content

fix(upstream): match the drift-issue signals label case-insensitively - #2619

Merged
JSONbored merged 1 commit into
JSONbored:mainfrom
jason020818:feat/upstream-signals-label-ci
Jul 2, 2026
Merged

fix(upstream): match the drift-issue signals label case-insensitively#2619
JSONbored merged 1 commit into
JSONbored:mainfrom
jason020818:feat/upstream-signals-label-ci

Conversation

@jason020818

@jason020818 jason020818 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

What

validateRecordedGitHubIssue recognizes a previously-recorded upstream-drift issue by owner, repo name, fingerprint, and its signals label. It already lowercases the owner and repo name before comparing them to the GitHub API response — but compared the label case-sensitively (=== "signals").

Why it is a bug

GitHub labels are case-insensitive, and an applied label is normalized to the repo's existing label casing. If a repo's signals label is stored as e.g. Signals, the case-sensitive check fails, the recorded drift issue is not recognized, and a duplicate issue is filed on the next run.

This is an internal inconsistency: two lines up in the same function, the owner and repo-name comparisons are already case-insensitive (parsedUrl.owner.toLowerCase() !== owner.toLowerCase() etc.), matching GitHub's semantics. The label check was the odd one out.

Fix

Compare the label lowercased, consistent with the owner/name checks in the same function. One line.

Test

  • Adds a Signals (case-variant) scenario asserting the recorded issue is updated, not duplicated — this fails on the pre-fix code (it filed a duplicate) and passes after.
  • Adds a nameless-label scenario ([{}]) covering the optional-chain arm.
  • The changed line has full branch coverage; no behavior changes outside the label comparison.

No linked issue

No linked issue because this is a maintenance fix for an internal inconsistency (the same function already compares owner/repo case-insensitively); there is no tracking issue to link.

validateRecordedGitHubIssue already lowercases the owner and repo name
before comparing them to the GitHub API response (mirroring GitHub's
case-insensitive semantics), but compared the issue's "signals" label
case-sensitively. A repo whose signals label is stored with different
casing (e.g. "Signals") therefore failed validation, so the recorded
drift issue was not recognized and a duplicate was filed. Compare the
label lowercased, consistent with the owner/name checks in the same
function.
@jason020818
jason020818 requested a review from JSONbored as a code owner July 2, 2026 15:19
@dosubot dosubot Bot added the size:XS label Jul 2, 2026
@loopover-orb

loopover-orb Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-02 23:21:22 UTC

2 files · 1 AI reviewer · no blockers · readiness 78/100 · CI green · clean

⏸️ Suggested Action - Manual Review

Review summary
This change correctly makes validateRecordedGitHubIssue compare the drift label case-insensitively while preserving the existing nullish behavior for nameless object labels. The added tests cover the real update path for a case-variant label and the optional-chain branch for a nameless label. I do not see a reachable break in the provided diff.

Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ No-issue rationale PR body explains why no issue is linked.
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (size label size:XS; no linked issue context).
Validation posture ❌ 5/25 Preflight is holding this PR: the review lane is unavailable, so it is not ready for automated review.
Contributor workload ✅ 10/10 Author activity: 332 registered-repo PR(s), 176 merged, 6 issue(s).
Contributor context ✅ Confirmed Gittensor contributor jaso0n0818; Gittensor profile; 332 PR(s), 6 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: jaso0n0818
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository registration is not available in the local Gittensory cache.
  • Public profile languages: not available
  • Official Gittensor activity: 332 PR(s), 6 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Await review-lane availability.
  • Refresh registry data or choose a registered active repo.
  • Link the issue being solved, or explicitly explain why this is a no-issue PR.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide 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

@loopover-orb loopover-orb Bot added gittensor gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. labels Jul 2, 2026
@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.04%. Comparing base (6ff084d) to head (b3618df).
⚠️ Report is 28 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2619   +/-   ##
=======================================
  Coverage   96.04%   96.04%           
=======================================
  Files         234      234           
  Lines       26209    26209           
  Branches     9510     9510           
=======================================
  Hits        25173    25173           
  Misses        425      425           
  Partials      611      611           
Files with missing lines Coverage Δ
src/upstream/ruleset.ts 98.49% <100.00%> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Helios531 pushed a commit to Helios531/gittensory that referenced this pull request Jul 2, 2026
…tes (JSONbored#2442)

The surface-lane orchestrator hard-closed any registry PR appending more
than one surfaces[] entry, contradicting metagraphed's documented 2026-06
anti-farming policy that explicitly wants multi-entry PRs (confirmed live
on PR JSONbored#2619, which the fix now resolves to merge instead of auto-close).

RegistryLaneSpec gains an opt-in maxAppendedEntries cap (default preserves
today's strict single-entry behavior for every other spec) and an opt-in
duplicateKeyFields for cross-entry duplicate detection, closing a side
effect where removing the entry cap also removed its incidental protection
against same-PR duplicate submissions.
@dosubot dosubot Bot added the lgtm label Jul 2, 2026
@JSONbored
JSONbored merged commit f540531 into JSONbored:main Jul 2, 2026
9 checks passed
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.

2 participants