refactor(mcp-auth): Phase 2 - Optional feature flags and dead code removal #72
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Phase 2 of Issue #64: Convert optional modules to feature flags and delete dead code.
Key Discovery: Dead Code Removal
The
integration/module (7,484 lines) existed insrc/integration/but was never declared in lib.rs, making it completely inaccessible to external crates. This was pure dead code that couldn't possibly be used by anyone.Changes Made
Deleted Dead Code (7,629 lines):
src/integration/directory - 7,484 lines of inaccessible codeAdded Optional Features:
monitoring- Security monitoring, dashboards, alerts (2,154 lines)vault- Enterprise vault integration for Infisical (1,412 lines)consent- GDPR/CCPA compliance (1,167 lines)production,compliance,fullDependency Optimization:
reqwestoptional (only needed forvaultfeature)Impact
Core library is now 13,758 lines - within 6% of the ~13,000 target! ✅
Testing
All feature combinations tested and passing:
Usage Examples
Rationale
Why delete integration/?
Why make features optional?
Result:
Files Modified
mcp-auth/Cargo.toml- Added feature flagsmcp-auth/src/lib.rs- Conditional compilation + updated docsmcp-auth/src/integration/- DELETED (entire directory)Related Issues
Addresses #64 (Phase 2)