feat(miner): expose manage-phase status as a read-only MCP tool - #5984
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-15 06:04:00 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 4 non-blocking
Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk 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.
Full command reference: https://gittensory.aethereal.dev/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.
|
f49a7cc to
5329817
Compare
5329817 to
7dffe16
Compare
Summary
loopover_miner_get_manage_statusto the miner's stdio MCP server (packages/loopover-miner/bin/loopover-miner-mcp.js), exposing the manage-phase status thatloopover-miner manage status --jsonalready prints. An MCP client can now ask "what is the live status of each PR this miner is managing, and what does that look like across the whole run?" without shelling out to the CLI.collectManageStatus({ portfolioQueue, eventLedger })andcollectRunPortfolio({ portfolioQueue, eventLedger, runStateStore })fromlib/manage-status.jsunchanged, returning their identical additive{ rows, runPortfolio }shape.loopover_miner_get_portfolio_dashboardwraps status counts from the portfolio queue alone, andloopover_miner_get_run_statewraps run-state alone. Neither returns the per-managed-PR detail rows or the run-portfolio view that joining all three local stores produces.Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #123) — a linked open issue is required for every contributor PR.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally;codecov/patchrequires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateRan the full local gate via
npm run test:ci— green, plusnpm audit --audit-level=moderate. Note:packages/loopover-miner/bin/**is not in the Codecov coverageincludeglob (onlypackages/loopover-miner/lib/**is), so this file carries no strict patch-coverage obligation — tests were still written to full parity with the siblingloopover_miner_get_portfolio_dashboard/loopover_miner_get_run_statetools' coverage (populated case, empty case, store-ownership invariant), plus a new row in the sharedminer-mcp-contract.test.tsinvariant table.Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.If any required check was skipped, explain why:
UI Evidence
Not applicable — no visible UI/frontend/docs/extension change beyond the README's MCP tool list, which is covered by the existing
miner MCP tool documentation paritytest.Notes
runManageStatus's own three-wayfinallyverbatim (ownsX = options.initX === undefined), so the tool closes only the stores it opened itself and leaves injected ones alone — the same conventionloopover_miner_get_portfolio_dashboardandloopover_miner_get_run_statealready use in this file.rows+runPortfolio), the empty case ({ rows: [], runPortfolio: [] }), a structural-identity invariant asserting the wrapper adds no drift versus calling the aggregators directly, a read-without-mutating invariant (noenqueue/appendEvent/setRunState), and the store-ownership invariant (injected stores are left open and still usable afterward).miner-mcp-contract.test.tsrows seed all three injection seams and vary only the one under test — an un-stubbed seam would otherwise fall through to a real on-disk store.Closes #5822