Skip to content

fix(scripts): scan the fumadocs-mdx docs content for stale @loopover/mcp versions#7125

Merged
JSONbored merged 1 commit into
JSONbored:mainfrom
jaytbarimbao-collab:fix-version-copy-scan-mdx-content-7093
Jul 17, 2026
Merged

fix(scripts): scan the fumadocs-mdx docs content for stale @loopover/mcp versions#7125
JSONbored merged 1 commit into
JSONbored:mainfrom
jaytbarimbao-collab:fix-version-copy-scan-mdx-content-7093

Conversation

@jaytbarimbao-collab

Copy link
Copy Markdown
Contributor

Closes #7093

scripts/check-ui-mcp-version-copy.mjs guards UI copy against stale @loopover/mcp version strings, but its SCAN_TARGETS only reached apps/loopover-ui/src and isTextSource did not match .mdx. Since the fumadocs-mdx migration (5003fabe) the docs prose moved to apps/loopover-ui/content/docs/*.mdx — a sibling of src/ — leaving ~10 files with @loopover/mcp install snippets unscanned. The sibling check-docs-drift.mjs was updated for the move; this scanner was not.

Change (scoped to source-file discovery, per the issue)

  • Add apps/loopover-ui/content to SCAN_TARGETS.
  • Extend isTextSource from /\.(md|ts|tsx|js|jsx|json)$/ to also match .mdx.
  • collectVersionCopyFailures matching logic is untouched.

Tests (test/unit/check-ui-mcp-version-copy-script.test.ts)

  • Asserts SCAN_TARGETS includes the content dir and isTextSource matches .mdx.
  • Asserts collectSourceFiles now picks up a real file under apps/loopover-ui/content/docs/*.mdx (quickstart.mdx).
  • Asserts a deliberately-stale @loopover/mcp version in a fixture .mdx is flagged.
  • Updated seedTempRepo to create the new content target dir.

Validation

  • npx vitest run test/unit/check-ui-mcp-version-copy-script.test.ts — 17 passed; 100% patch coverage on the changed lines.
  • npm run ui:version-audit — passes, now scanning 4 targets (the content docs currently use the correct @latest form).

…mcp versions

check-ui-mcp-version-copy.mjs guards UI copy against stale @loopover/mcp
version strings, but its SCAN_TARGETS only reached apps/loopover-ui/src and
isTextSource didn't match .mdx. Since the fumadocs-mdx migration (5003fab) the
docs prose moved to apps/loopover-ui/content/docs/*.mdx — a sibling of src/ —
leaving ~10 files with @loopover/mcp install snippets unscanned (the sibling
check-docs-drift.mjs was updated for the move; this scanner was not).

Add apps/loopover-ui/content to SCAN_TARGETS and .mdx to isTextSource so the
content pipeline is scanned the same way src/ and the READMEs already are. The
current docs use the correct @latest form, so the live scan still passes (now
across 4 targets); a future hardcoded/stale version in any .mdx is now caught.

Closes JSONbored#7093
@superagent-security

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.98%. Comparing base (8e31375) to head (976537c).
⚠️ Report is 13 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7125      +/-   ##
==========================================
+ Coverage   93.75%   95.98%   +2.22%     
==========================================
  Files         692      609      -83     
  Lines       68809    48145   -20664     
  Branches    18781    15133    -3648     
==========================================
- Hits        64512    46210   -18302     
+ Misses       3302     1118    -2184     
+ Partials      995      817     -178     
Flag Coverage Δ
rees ?
shard-1 43.79% <ø> (ø)
shard-2 36.84% <ø> (ø)
shard-3 33.14% <ø> (ø)
shard-4 34.48% <ø> (ø)
shard-5 32.29% <ø> (-0.01%) ⬇️
shard-6 45.76% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 83 files with indirect coverage changes

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

loopover-orb Bot commented Jul 17, 2026

Copy link
Copy Markdown

Warning

⏸️ LoopOver review result - manual review recommended

Review updated: 2026-07-17 23:17:38 UTC

2 files · 1 AI reviewer · no blockers · CI pending · unknown

⏸️ Suggested Action - Manual Review

Review summary
Small, well-scoped fix: adds `apps/loopover-ui/content` to `SCAN_TARGETS` and extends `isTextSource` to match `.mdx`, closing the gap left after the fumadocs-mdx migration. Logic in `collectVersionCopyFailures` is untouched, so the fix is at the correct layer (source discovery), and the accompanying tests exercise the real discovery path (`collectSourceFiles` against a real `content/docs` dir) plus a realistic stale-version fixture rather than a fabricated scenario. The `seedTempRepo` update correctly adds the new target dir to avoid an ENOENT from `statSync` in the `--write` CLI test.

Nits — 3 non-blocking
  • scripts/check-ui-mcp-version-copy.mjs:16-25 — `.mdx` is now scanned but the new regex/skip-list in `collectSourceFiles` doesn't exclude fumadocs meta files (e.g. `meta.json`) that may live alongside the mdx content; worth confirming none produce false positives, though `.json` was already scanned before this PR so this isn't new risk from this diff.
  • No test asserts that non-content directories (e.g. `apps/loopover-ui/src`) are unaffected by the `.mdx` extension change — low risk since `.mdx` files don't exist there today, but worth a one-line comment if that's an assumption.
  • Consider asserting in the test suite that `collectSourceFiles` over the real `apps/loopover-ui/content` tree currently returns zero failures end-to-end (beyond the existing full-script regression test), to lock in current-state cleanliness the same way check-docs-drift-script.test.ts does with its 'real repo' guard.

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ✅ Gate result — Passing (No configured blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #7093
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: 189 registered-repo PR(s), 96 merged, 14 issue(s).
Contributor context ✅ Confirmed Gittensor contributor jaytbarimbao-collab; Gittensor profile; 189 PR(s), 14 issue(s).
Improvement ✅ Minor risk: clean · value: minor
Review context
  • Author: jaytbarimbao-collab
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: not available
  • Official Gittensor activity: 189 PR(s), 14 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 &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat &lt;question&gt; 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.

🟩 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 added the manual-review Gittensor contributor context label Jul 17, 2026
@JSONbored
JSONbored merged commit 097ac2f into JSONbored:main Jul 17, 2026
15 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. manual-review Gittensor contributor context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

check-ui-mcp-version-copy.mjs's SCAN_TARGETS is blind to apps/loopover-ui/content's *.mdx docs since the fumadocs migration

2 participants