11 Commits
Author SHA1 Message Date
胡绍康 a26079026b fix: clear release quality gates 2026-03-15 09:41:45 +08:00
胡绍康 01d1dc0874 feat: implement external API security architecture (public mode, IP whitelist, rate limit)
- Add ExternalApiGuard for IP whitelisting, rate limiting, and public mode enforcement
- Update wait-message to support async mode
- Fix bugs in verification code extraction (BUG-00014 to BUG-00017)
- Update documentation and architectural diagrams
2026-03-13 11:27:34 +08:00
胡绍康andCopilot a01b48a813 feat: PRD-00008 P1 公网模式安全层 — 守卫模块、设置 UI、321 测试全绿
- 新增 external_api_guard.py:IP 白名单、限流(SQLite 分钟桶)、高风险端点禁用
- DB v5→v6:新增 external_api_rate_limits 表 + 5 项 P1 默认设置
- 10 个外部 API 端点集成 @external_api_guards() 装饰器
- capabilities 端点增强:public_mode / restricted_features
- settings 控制器 + 前端 UI:公网模式开关、IP 白名单、限流、功能禁用
- 新增 18 个 P1 守卫测试(TC-GUARD-01~18),总计 321 测试全绿
- 更新 api.md:P1 错误码、配置文档
- 默认 public_mode=false,与 P0 行为完全兼容

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-11 22:18:40 +08:00
胡绍康 1d4d848702 fix: align external api behavior with PRD-00008 2026-03-10 21:24:55 +08:00
胡绍康 9673b3524d feat: add external api docs tests and verification updates 2026-03-09 15:07:18 +08:00
胡绍康 8ee73e6572 style: apply latest black formatting for ci 2026-03-09 13:46:45 +08:00
胡绍康andClaude Opus 4.6 d9a6889bd8 style: 修复代码格式以通过 Black 检查
- 修复多行 SQL 查询字符串的格式
- 移除不必要的括号
- 统一代码风格以符合 Black 规范

修复的文件:
- outlook_web/controllers/accounts.py
- outlook_web/controllers/system.py
- outlook_web/db.py
- outlook_web/repositories/accounts.py
- outlook_web/repositories/groups.py
- outlook_web/services/refresh.py
- outlook_web/services/scheduler.py

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 13:42:26 +08:00
胡绍康andClaude Opus 4.6 f7a8817970 style: 使用 Black 和 isort 格式化代码
- 使用 Black 格式化 47 个 Python 文件
- 使用 isort 修复 import 排序
- 修复 Code Quality CI/CD 检查失败问题

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 13:12:16 +08:00
胡绍康andCopilot c70d2b97dd chore: 代码质量修复 + CI升级
- black 格式化 (1 file)
- isort 排序修复 (30 files, --profile black)
- 升级 actions/checkout v4 → v6 (全部 3 个 workflow)
- 添加 pyproject.toml (black/isort 配置)
- isort CI 命令添加 --profile black 参数
- 114 测试全部通过

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-01 21:52:44 +08:00
胡绍康andClaude Opus 4.6 0eb36f5175 style: 运行 Black 格式化所有 Python 代码
- 格式化 66 个 Python 文件以符合 Black 代码风格
- 修复 GitHub Actions Code Quality 工作流失败问题

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 18:23:57 +08:00
胡绍康andClaude Opus 4.6 3228661a93 feat: 迁移 system 模块到 controllers 层
- 迁移 4 个 system 相关 API 到 controllers/system.py:
  - healthz (无需登录)
  - api_system_health
  - api_system_diagnostics
  - api_system_upgrade_status
- 更新 routes/system.py 移除 impl 参数
- 添加 utcnow 辅助函数和 REFRESH_LOCK_NAME 常量

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 00:33:46 +08:00