Skip to content

feat(mcp): add loopover_refresh_repo_focus_manifest tool - #9348

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
bitfathers94:fix/issue-9299
Jul 27, 2026
Merged

feat(mcp): add loopover_refresh_repo_focus_manifest tool#9348
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
bitfathers94:fix/issue-9299

Conversation

@bitfathers94

Copy link
Copy Markdown
Contributor

feat(mcp): add loopover_refresh_repo_focus_manifest tool

Mirror POST /v1/repos/:owner/:repo/focus-manifest/refresh as an MCP tool, the
refresh counterpart to the read-only loopover_get_repo_focus_manifest. Forces a
live reload of the cached .loopover.yml manifest via loadRepoFocusManifest(...,
{ refresh: true }) + compileFocusManifestPolicy, returning the same
{ repoFullName, manifest, policy } shape the REST route returns.

Uses the write-access boundary (requireRepoManageAccess), matching the route's
requireRepoWriteAccess -- stricter than the read tool's read-only boundary --
and registers under the maintainer category, alongside loopover_refresh_repo_docs.

Closes #9299

Validation

Verified locally on this branch before opening:

  • npm run typecheck
  • npx turbo run build:tsc build:verify
  • npm run test:coverage — patch coverage 100.0% of changed lines

Mirror POST /v1/repos/:owner/:repo/focus-manifest/refresh as an MCP tool, the
refresh counterpart to the read-only loopover_get_repo_focus_manifest. Forces a
live reload of the cached .loopover.yml manifest via loadRepoFocusManifest(...,
{ refresh: true }) + compileFocusManifestPolicy, returning the same
{ repoFullName, manifest, policy } shape the REST route returns.

Uses the write-access boundary (requireRepoManageAccess), matching the route's
requireRepoWriteAccess -- stricter than the read tool's read-only boundary --
and registers under the maintainer category, alongside loopover_refresh_repo_docs.
@bitfathers94
bitfathers94 requested a review from JSONbored as a code owner July 27, 2026 13:38
@superagent-security

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.81%. Comparing base (aad3f93) to head (fe28b60).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9348      +/-   ##
==========================================
+ Coverage   75.38%   75.81%   +0.43%     
==========================================
  Files         275      276       +1     
  Lines       58023    59211    +1188     
  Branches     6181     6417     +236     
==========================================
+ Hits        43739    44892    +1153     
- Misses      14014    14027      +13     
- Partials      270      292      +22     
Flag Coverage Δ
backend 97.05% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/mcp/server.ts 97.05% <100.00%> (ø)

@loopover-orb loopover-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 27, 2026
@loopover-orb

loopover-orb Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Tip

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-27 13:45:52 UTC

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

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
Adds a write-side MCP tool mirroring POST /v1/repos/:owner/:repo/focus-manifest/refresh, reusing the same loadRepoFocusManifest(refresh:true) + compileFocusManifestPolicy pair as the REST route and returning the identical { repoFullName, manifest, policy } shape. The write-access boundary (requireRepoManageAccess) is correctly stricter than the read tool, and the accompanying test suite exercises registration, the cache-bypass behavior via a live-vs-stale fetch assertion, allowlist denial, and the read-vs-write access distinction. The implementation is a thin, well-scoped mirror consistent with the existing loopover_refresh_repo_docs pattern.

Nits — 3 non-blocking
  • The `long-file` flag on src/mcp/server.ts (~3571 lines) is a pre-existing condition this PR adds 29 lines to, not something introduced by the diff — worth a follow-up to split this registration file, but not this PR's job.
  • The 88-line test file duplicates a fair amount of connect/setup boilerplate seen in sibling MCP tool test files; consider extracting a shared test helper if this pattern repeats further.
  • Consider extracting the repeated `connect()` helper and static-identity fixtures across MCP tool test files into a shared test util if more refresh-style tools are added.

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 #9299
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: 65 registered-repo PR(s), 45 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor bitfathers94; Gittensor profile; 65 PR(s), 0 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: moderate
Linked issue satisfaction

Addressed
The PR adds loopover_refresh_repo_focus_manifest in src/mcp/server.ts registered under MCP_TOOL_CATEGORIES as maintainer, using ownerRepoShape input, requireRepoManageAccess (write-access boundary), and loadRepoFocusManifest(..., { refresh: true }) + compileFocusManifestPolicy returning the same {repoFullName, manifest, policy} shape as the REST route. It also includes unit tests covering the happ

Review context
  • Author: bitfathers94
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: TypeScript
  • Official Gittensor activity: 65 PR(s), 0 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 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LoopOver approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit c2ac612 into JSONbored:main Jul 27, 2026
8 checks passed
@github-actions github-actions Bot mentioned this pull request Jul 27, 2026
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mcp: add loopover_refresh_repo_focus_manifest tool mirroring POST .../focus-manifest/refresh

1 participant