chore(mcp): drop three unused settings/autonomy imports from server.ts#8423
Conversation
AGENT_ACTION_CLASSES, isActingAutonomyLevel, and resolveAutonomy were imported into src/mcp/server.ts but referenced nowhere in it; only AUTONOMY_LEVELS is used. src/** has no ESLint config and the root tsconfig sets neither noUnusedLocals nor noUnusedParameters, so neither static-analysis layer flags this. The autonomy module's exports are unchanged (other callers use them), and MAINTAIN_AUTONOMY_ACTION_CLASSES is deliberately left alone as the documented intentional divergence it is. Closes JSONbored#8339
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8423 +/- ##
==========================================
+ Coverage 80.15% 89.92% +9.77%
==========================================
Files 791 98 -693
Lines 79290 23855 -55435
Branches 23950 4091 -19859
==========================================
- Hits 63551 21451 -42100
+ Misses 12382 2200 -10182
+ Partials 3357 204 -3153
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-24 13:03:11 UTC
Review summary Nits — 3 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed 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://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.
|
Summary
src/mcp/server.ts:175imported four names from../settings/autonomybut referenced only one.AGENT_ACTION_CLASSES,isActingAutonomyLevel, andresolveAutonomyappear nowhere else in the file (exact-identifier grep returns only the import line for each, and there is no re-export);AUTONOMY_LEVELSis genuinely used, e.g.z.enum(AUTONOMY_LEVELS)in thesetActionAutonomyShapetool-input schema.AUTONOMY_LEVELSonly.src/**has no ESLint config (onlyapps/loopover-miner-uiandapps/loopover-uiship aneslint.config.js), and the roottsconfig.jsonsets neithernoUnusedLocalsnornoUnusedParameters.packages/loopover-engine/src/settings/autonomy.tsis untouched — those exports stay exported and are used elsewhere (e.g.packages/loopover-mcp/bin/loopover-mcp.ts).MAINTAIN_AUTONOMY_ACTION_CLASSES(src/mcp/server.ts:623) is deliberately not touched: it is the documented intentional divergence fromAGENT_ACTION_CLASSES("do not sync it to the engine list",packages/loopover-mcp/bin/loopover-mcp.ts:149-152), unrelated to this cleanup.Closes #8339
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=moderateIf any required check was skipped, explain why:
src/mcp/server.tswith no behavior change, soactionlint(no workflow change),build:mcp/test:mcp-pack(this is the in-repo MCP server module, not the publishedpackages/loopover-mcppackage or its tarball),ui:*(no UI/OpenAPI change),test:workers(no worker change), andnpm audit(no dependency change) are not exercised by it.tsc --noEmitis clean (the strongest signal here: an actually-used import would fail to compile once removed), and all three suites that importsrc/mcp/server.tspass in full (change-guardrail,issue-plan-decomposition,issue-watch— 43 tests).importstatement, which is not an instrumented (DA) line, so the patch contains no coverable lines and nothing can be reported uncovered.src/mcp/server.tsstill appears in the scoped run'scoverage/lcov.info, so the "Verify coverage report exists" step is satisfied.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.UI Evidence
Not applicable — a single import-line cleanup in
src/mcp/server.ts; no visible UI, frontend, docs, or extension change.Notes