Skip to content

feat(mcp): Add --disable-metrics flag to MCP serve command and remove nsjail - #506

Merged
shivasurya merged 1 commit into
mainfrom
shiva/disable-analytics-option-mcp
Feb 7, 2026
Merged

shivasurya merged 1 commit into
mainfrom
shiva/disable-analytics-option-mcp

Conversation

@shivasurya

Copy link
Copy Markdown
Owner

Summary

  • Pass --disable-metrics persistent flag through to MCP analytics layer in serve command
  • Remove nsjail sandboxing support from DSL loader, Dockerfile, and entrypoint
  • Fix all 8 prealloc lint warnings

Changes

  • Add disabled field to MCP Analytics struct with early-return guards on all report methods
  • Propagate disableAnalytics through NewServer and SetTransport
  • Remove isSandboxEnabled(), buildNsjailCommand(), nsjail Docker install, and sandbox env vars
  • Preallocate slices in 8 files to resolve all lint issues

Testing

  • ✅ gradle buildGo - Build successful
  • ✅ gradle testGo - All 24 Go packages + 300 Python tests pass
  • ✅ gradle lintGo - 0 issues
  • Added tests for disabled analytics, serve command flags, and transport switching

🤖 Generated with Claude Code

… nsjail

- Pass --disable-metrics flag through to MCP analytics layer for serve command
- Add disabled field to MCP Analytics struct with early-return in all report methods
- Preserve disable state across transport switches (stdio → http)
- Remove nsjail sandboxing code from DSL loader, Dockerfile, and entrypoint
- Fix all prealloc lint warnings across 8 files
- Add comprehensive tests for disabled analytics and serve command flags

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@shivasurya shivasurya added enhancement New feature or request go Pull requests that update go code chore docker Docker/Dockerfile related changes labels Feb 7, 2026
@shivasurya shivasurya self-assigned this Feb 7, 2026
@shivasurya
shivasurya merged commit 124b204 into main Feb 7, 2026
4 checks passed
@shivasurya
shivasurya deleted the shiva/disable-analytics-option-mcp branch February 7, 2026 01:07
@codecov

codecov Bot commented Feb 7, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.33333% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.13%. Comparing base (0648db3) to head (f42a9e7).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
sast-engine/cmd/serve.go 0.00% 2 Missing ⚠️
sast-engine/cmd/resolution_report.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #506      +/-   ##
==========================================
+ Coverage   80.92%   81.13%   +0.21%     
==========================================
  Files         113      113              
  Lines       13320    13302      -18     
==========================================
+ Hits        10779    10793      +14     
+ Misses       2136     2107      -29     
+ Partials      405      402       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore docker Docker/Dockerfile related changes enhancement New feature or request go Pull requests that update go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant