Skip to content

fix(extension): remove dead matchPullRequestTarget from content.js - #8037

Closed
joaovictor91123 wants to merge 1 commit into
JSONbored:mainfrom
joaovictor91123:fix/extension-remove-dead-match-pull-request-target-8023
Closed

fix(extension): remove dead matchPullRequestTarget from content.js#8037
joaovictor91123 wants to merge 1 commit into
JSONbored:mainfrom
joaovictor91123:fix/extension-remove-dead-match-pull-request-target-8023

Conversation

@joaovictor91123

Copy link
Copy Markdown
Contributor

Closes #8023

Summary

  • matchPullRequestTarget in apps/loopover-extension/content.js duplicated matchGitHubPageTarget's logic (minus the kind field) and was stranded by fix(extension): drop dead issue-page content-script match #7487's issue-page match removal.
  • Confirmed via grep across the repo that it's referenced nowhere else, including production code and the __loopoverContentInternals test-hook object.
  • Removed the dead function and its entry in the __loopoverContentInternals export.

Scope checklist

  • Only touches apps/loopover-extension/content.js
  • No behavior change (dead code removal only)

Validation checklist

  • Grepped the whole repo for matchPullRequestTarget — only the (now-removed) definition and export existed
  • apps/loopover-extension has no automated test suite (confirmed), matching the issue's own note; no test changes needed

Safety checklist

  • No secrets, tokens, wallets, hotkeys/coldkeys, trust scores, or reward/payout values touched
  • No changes to site/, CNAME, or **/lovable/**

matchPullRequestTarget duplicated matchGitHubPageTarget's logic (minus
the kind field) and was stranded by JSONbored#7487's issue-page match removal.
Confirmed via grep it's referenced nowhere else, including production
code and the __loopoverContentInternals test-hook object.

Closes JSONbored#8023
@superagent-security

Copy link
Copy Markdown
Contributor

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

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 22, 2026
@loopover-orb

loopover-orb Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Caution

🛑 LoopOver review result - reject/close recommended

Review updated: 2026-07-22 14:42:51 UTC

1 file · 1 AI reviewer · 1 blocker · CI green · clean

🛑 Suggested Action - Reject/Close

Review summary
This PR deletes the dead `matchPullRequestTarget` function and its `__loopoverContentInternals` export entry from apps/loopover-extension/content.js, a small, well-scoped dead-code removal per the stated intent (closing #8023). However, the existing test file test/unit/extension-content.test.ts (shown in the provided repo context) calls `internals.matchPullRequestTarget(...)` in four separate assertions inside the 'detects GitHub pull request routes' test — after this diff, `matchPullRequestTarget` is no longer part of the `__loopoverContentInternals` export, so those calls would throw a TypeError on `undefined` rather than pass. This directly contradicts the PR's validation checklist claim that the function is 'referenced nowhere else.'

Blockers

  • test/unit/extension-content.test.ts still asserts on `internals.matchPullRequestTarget(...)` in multiple places, but content.js:186-193 removes that symbol from `__loopoverContentInternals`, so those assertions would throw a TypeError rather than pass — the PR's own checklist ('referenced nowhere else... only the (now-removed) definition and export existed') is contradicted by this visible test file, and the test wasn't updated in this diff.
Nits — 4 non-blocking

Why this is blocked

  • test/unit/extension-content.test.ts still asserts on `internals.matchPullRequestTarget(...)` in multiple places, but content.js:186-193 removes that symbol from `__loopoverContentInternals`, so those assertions would throw a TypeError rather than pass — the PR's own checklist ('referenced nowhere else... only the (now-removed) definition and export existed') is contradicted by this visible test file, and the test wasn't updated in this diff.
📋 Copy for AI agents — paste into your coding agent
Fix the following blocker(s) from this PR review:

1. test/unit/extension-content.test.ts still asserts on \`internals.matchPullRequestTarget\(...\)\` in multiple places, but content.js:186-193 removes that symbol from \`\_\_loopoverContentInternals\`, so those assertions would throw a TypeError rather than pass — the PR's own checklist \('referenced nowhere else... only the \(now-removed\) definition and export existed'\) is contradicted by this visible test file, and the test wasn't updated in this diff.

Decision drivers

  • ❌ Code review — 1 blocker (1 reviewer)
  • ❌ Gate result — Blocking (Repo-configured hard blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #8023
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 (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 158 registered-repo PR(s), 69 merged, 6 issue(s).
Contributor context ✅ Confirmed Gittensor contributor joaovictor91123; Gittensor profile; 158 PR(s), 6 issue(s).
Improvement ℹ️ None detected risk: low · value: none · LLM: minor
Linked issue satisfaction

Addressed
The diff removes the matchPullRequestTarget function definition and its entry in the __loopoverContentInternals export exactly as the issue requested, with no other changes.

Review context
  • Author: joaovictor91123
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, JavaScript, MDX, C++, CSS, Rust, TypeScript
  • Official Gittensor activity: 158 PR(s), 6 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
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.
🧪 Chat with LoopOver

Ask LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @loopover ask <question> answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat <question> answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://loopover.ai/docs/loopover-commands

🧪 Experimental — new and may change.

Visual preview
Route Viewport Before (production) After (this PR's preview) Diff
/ desktop before /
before /
after /
after /
/ mobile before / (mobile)
before / (mobile)
after / (mobile)
after / (mobile)

Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy.

Scroll preview
Route Before (production) After (this PR's preview)
/ before / (scroll)
before / (scroll)
after / (scroll)
after / (scroll)

A short scroll-through clip (desktop) — click either thumbnail to open the full animation. Evidence for scroll-linked behavior a single screenshot can't show.

🟩 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 LoopOver, a quiet PR intelligence layer for OSS maintainers.

  • Re-run LoopOver review

@loopover-orb

loopover-orb Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

LoopOver is closing this pull request on the maintainer's behalf (AI reviewers agree on a likely critical defect: test/unit/extension-content.test.ts still asserts on `internals.matchPullRequestTarget(...)` in multiple places, but content.js:186-193 removes that symbol from `__loopoverContentInternals`, so those assertions would throw a TypeError rather than pass — the PR's own checklist ('referenced nowhere else... only the (now-removed) definition and export existed') is contradicted by this visible test file, and the test wasn't updated in this diff.). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed.

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.

matchPullRequestTarget is dead code left behind in loopover-extension/content.js by #7487's issue-page match removal

1 participant