Skip to content

fix(rules): match label multipliers with scoring parity in advisory#2526

Merged
JSONbored merged 1 commit into
JSONbored:mainfrom
kiannidev:fix/advisory-label-multiplier-parity
Jul 2, 2026
Merged

fix(rules): match label multipliers with scoring parity in advisory#2526
JSONbored merged 1 commit into
JSONbored:mainfrom
kiannidev:fix/advisory-label-multiplier-parity

Conversation

@kiannidev

Copy link
Copy Markdown
Contributor

Summary

  • buildPullRequestAdvisory surfaced label_context_found via exact repoMultipliers[label] lookup.
  • Scoring and engine already use labelMatchesPattern (case-insensitive fnmatch glob semantics), so advisory missed labels like Feature when config had feature, or type:bug-fix when config had type:*.
  • Reuse the exported labelMatchesPattern helper so predicted-gate and live gate advisories agree with scoring.

Scope

  • The PR title follows type(scope): short summary Conventional Commit format.
  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked an issue, or this is small enough that the summary explains why an issue is not needed.

Validation

  • git diff --check
  • npx vitest run test/unit/rules.test.ts -t "label multipliers" — passing (case + glob regressions)

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • N/A — no auth/API/UI changes.

Notes

Made with Cursor

Advisory label_context_found used exact case-sensitive keys, missing labels
that scoring already matches via labelMatchesPattern glob semantics.

Co-authored-by: Cursor <cursoragent@cursor.com>
@kiannidev kiannidev requested a review from JSONbored as a code owner July 2, 2026 07:44
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label 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 95.97%. Comparing base (db2789f) to head (c9dce47).
⚠️ Report is 34 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2526      +/-   ##
==========================================
+ Coverage   95.95%   95.97%   +0.02%     
==========================================
  Files         226      226              
  Lines       25387    25533     +146     
  Branches     9234     9293      +59     
==========================================
+ Hits        24359    24505     +146     
  Misses        417      417              
  Partials      611      611              
Files with missing lines Coverage Δ
src/rules/advisory.ts 97.62% <100.00%> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gittensory-orb

gittensory-orb Bot commented Jul 2, 2026

Copy link
Copy Markdown

Warning

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

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-02 08:22:14 UTC

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

⏸️ Suggested Action - Manual Review

  • Touches a guarded path — held for manual review

Review summary
The change correctly moves advisory label matching from exact object-key lookup to the same case-insensitive glob helper used by scoring, so `label_context_found` now fires for case variants and configured patterns. The added unit test covers the two important parity cases plus a negative case, and CI already validated the changed path. I do not see a reachable correctness defect in the visible diff.

Nits — 4 non-blocking
  • nit: test/unit/rules.test.ts:489 checks only that `label_context_found` exists, so it would not catch a future regression where the advisory finding fires but reports the wrong matched label text or metadata.
  • test/unit/rules.test.ts:489 should assert the emitted `label_context_found` finding content includes the actual PR label for both `Feature` and `type:bug-fix`, not just the finding code.
  • Readiness score is below the configured threshold — Use the readiness panel as advisory maintainer context; the score does not block this PR.
  • Touches a guarded path — held for manual review — A maintainer must review and merge this change.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ⚠️ Missing No linked issue or no-issue rationale found.
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: 2219 registered-repo PR(s), 1173 merged, 39 issue(s).
Contributor context ✅ Confirmed Gittensor contributor kiannidev; Gittensor profile; 2219 PR(s), 39 issue(s).
Gate result ⚠️ Not blocking Advisory; not blocking this PR.
Review context
  • Author: kiannidev
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository registration is not available in the local Gittensory cache.
  • Public profile languages: TypeScript, MDX, C++, HTML, Rust
  • Official Gittensor activity: 2219 PR(s), 39 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Explain no-issue PR.
  • 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

@gittensory-orb gittensory-orb Bot added gittensor Gittensor contributor context gittensor:bug Gittensor-scored bug fix — scores a 0.5x multiplier. labels Jul 2, 2026
@dosubot dosubot Bot added the lgtm Approved by a maintainer. label Jul 2, 2026
@JSONbored JSONbored merged commit e2b93ae into JSONbored:main Jul 2, 2026
9 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jul 2, 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 — scores a 0.5x multiplier. gittensor Gittensor contributor context lgtm Approved by a maintainer. size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants