
Chris CoutinhoandClaude Sonnet 4.5
1a5bb10cd0
feat(config): consolidate configuration with smart dependency resolution (ADR-021)
Simplifies configuration by consolidating overlapping settings and adding
automatic dependency resolution. This makes semantic search configuration
significantly easier for users while maintaining 100% backward compatibility.
## Key Changes
### Variable Renaming (Backward Compatible)
- `VECTOR_SYNC_ENABLED` → `ENABLE_SEMANTIC_SEARCH` (old name still works)
- `ENABLE_OFFLINE_ACCESS` → `ENABLE_BACKGROUND_OPERATIONS` (old name still works)
- Deprecation warnings logged when old names used
- Old names will be removed in v1.0.0
### Smart Dependency Resolution
- `ENABLE_SEMANTIC_SEARCH` automatically enables background operations in multi-user modes
- No need to set both `ENABLE_OFFLINE_ACCESS` and `VECTOR_SYNC_ENABLED` anymore
- Single-user mode doesn't auto-enable background ops (not needed)
### Explicit Mode Selection (Optional)
- New `MCP_DEPLOYMENT_MODE` environment variable
- Valid values: single_user_basic, multi_user_basic, oauth_single_audience,
oauth_token_exchange, smithery
- Removes ambiguity about which deployment mode is active
- Falls back to auto-detection if not set (existing behavior)
### Configuration Templates
- Reorganized `env.sample` by deployment mode with clear sections
- Added mode-specific quick-start templates:
- `env.sample.single-user` - Simplest configuration
- `env.sample.oauth-multi-user` - Recommended multi-user
- `env.sample.oauth-advanced` - Token exchange mode
## Implementation Details
### Files Modified
- `nextcloud_mcp_server/config.py` - Smart dependency resolution helpers
- `nextcloud_mcp_server/config_validators.py` - Simplified validation, explicit mode
- `tests/unit/test_config_validators.py` - 19 new tests (60 total, all passing)
- `env.sample` - Reorganized by deployment mode
- `docs/configuration.md` - Complete rewrite with consolidated approach
- `docs/troubleshooting.md` - New consolidation troubleshooting section
- `README.md` - Updated variable references
### New Files
- `docs/ADR-021-configuration-consolidation.md` - Architecture decision record
- `docs/configuration-migration-v2.md` - Comprehensive migration guide
- `env.sample.single-user` - Single-user quick-start template
- `env.sample.oauth-multi-user` - OAuth multi-user quick-start template
- `env.sample.oauth-advanced` - Token exchange quick-start template
## User Impact
### Before (Confusing)
```bash
ENABLE_OFFLINE_ACCESS=true # Why both?
VECTOR_SYNC_ENABLED=true # What's the relationship?
```
### After (Simplified)
```bash
MCP_DEPLOYMENT_MODE=oauth_single_audience # Explicit (optional)
ENABLE_SEMANTIC_SEARCH=true # Auto-enables background ops!
```
### Benefits
- 📉 2 fewer variables to understand for semantic search
- 📋 Clear intent ("I want semantic search")
- 🎯 Explicit mode declaration available
- 🔄 100% backward compatible
- ✅ All 265 unit tests passing
## Testing
- All 60 config validation tests passing
- 10 new tests for configuration consolidation
- 9 new tests for explicit mode selection
- Full unit test suite: 265 tests passing
- Backward compatibility verified
## Migration
Users can migrate at their own pace. Old variable names continue working
with deprecation warnings. See docs/configuration-migration-v2.md for
detailed migration instructions.
Related: ADR-021
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-21 20:36:36 +01:00
..
2025-11-19 14:10:53 +01:00
2025-11-19 14:10:53 +01:00
2025-05-07 23:06:22 +02:00
2025-11-02 23:31:39 +01:00
2025-11-08 20:32:49 +01:00
2025-11-04 00:03:24 +01:00
2025-11-03 20:33:56 +01:00
2025-11-05 23:19:03 +01:00
2025-11-07 21:08:55 +01:00
2025-11-11 20:53:43 +01:00
2025-11-09 04:47:20 +01:00
2025-11-09 04:47:20 +01:00
2025-11-11 20:35:08 +01:00
2025-11-13 23:30:14 +01:00
2025-11-18 12:17:23 +01:00
2025-11-15 00:02:54 +01:00
2025-11-15 23:11:21 +01:00
2025-11-17 06:48:43 +01:00
2025-11-16 11:36:58 +01:00
2025-11-22 17:13:18 +01:00
2025-12-11 13:50:55 +01:00
2025-12-18 00:02:08 +01:00
2025-12-20 20:49:28 +01:00
2025-12-21 20:36:36 +01:00
2025-11-02 22:03:22 +01:00
2025-10-14 01:23:49 +02:00
2025-11-16 11:36:58 +01:00
2025-09-11 17:31:00 +02:00
2025-10-15 14:47:43 +02:00
2025-12-21 20:36:36 +01:00
2025-12-21 20:36:36 +01:00
2025-09-11 17:28:13 +02:00
2025-10-17 03:08:16 +02:00
2025-11-03 20:33:56 +01:00
2025-12-18 00:02:09 +01:00
2025-09-11 17:28:13 +02:00
2025-10-14 01:23:38 +02:00
2025-11-02 22:03:21 +01:00
2025-11-02 22:03:19 +01:00
2025-12-12 17:30:22 +01:00
2025-05-06 02:52:51 +02:00
2025-11-09 01:00:18 +01:00
2025-11-02 23:58:15 +01:00
2025-11-09 04:47:20 +01:00
2025-11-02 22:03:22 +01:00
2025-11-02 22:03:21 +01:00
2025-11-02 22:03:21 +01:00
2025-11-02 22:03:21 +01:00
2025-11-16 11:16:05 +01:00
2025-10-15 16:27:22 +02:00
2025-12-18 00:02:09 +01:00
2025-12-13 23:51:18 +01:00
2025-09-11 17:28:13 +02:00
2025-10-23 11:20:49 +02:00
2025-10-24 04:38:49 +02:00
2025-12-21 20:36:36 +01:00
2025-09-11 17:28:13 +02:00