Phase 4 Backend P0 cleanup #276
Reference in New Issue
Block a user
Delete Branch "cleanup/phase4-backend-p0"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Phase 4 Backend P0 清理
1. 删除 aiosmtplib 废弃依赖
aiosmtplib==3.0.2(项目中未使用)2. 清理未使用配置项
API_PREFIX、REDIS_MAX_CONNECTION、JWT_SECRET_KEY_OLD、SECRET_ROTATION_DAYS、LOG_LEVELENABLE_REDIS_SESSIONS(在 dependencies.py 中实际使用)3. 修复项目权限检查 TODO
4. 合并两套 Storage 实现
packages/shared/storage.py:合并 API 特有功能(HTTPS endpoint 修复、diagnose() 诊断、详细日志)apps/api/app/core/storage.py:改为薄层 re-export wrapper,保持向后兼容packages.shared.storage变更文件(9个)
1. Remove unused aiosmtplib dependency from requirements.txt 2. Remove 5 unused config items (API_PREFIX, REDIS_MAX_CONNECTION, JWT_SECRET_KEY_OLD, SECRET_ROTATION_DAYS, LOG_LEVEL) from config.py, .env.production.example, and init_production_env.sh. Kept ENABLE_REDIS_SESSIONS (actively used in dependencies.py). 3. Fix project permission check TODOs in test_error_scenarios.py — permissions are implemented, updated assertions to expect 403. 4. Merge two Storage implementations into shared package: - packages/shared/storage.py: merged API features (HTTPS endpoint fix, diagnose(), detailed logging) into SharedStorageService - apps/api/app/core/storage.py: thin re-export wrapper for backward compatibility - Updated test mocks to target packages.shared.storage