胡绍康
a26079026b
fix: clear release quality gates
2026-03-15 09:41:45 +08:00
胡绍康 and Copilot
6085ddd926
fix: harden external API guard client IP
...
Use auth.get_client_ip for whitelist/rate-limit decisions to avoid X-Forwarded-For spoofing. Add tests for trusted-proxy behavior.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-03-13 12:42:12 +08:00
胡绍康 and Copilot
09c3ab3416
fix: gate low-confidence verification extraction results as 404 (BUG-00017)
...
- Add code_confidence/link_confidence fine-grained fields to extractor
- Service-layer credibility gate: confidence != high -> nullify result -> 404
- Caller-directed extraction (code_regex only) gets high confidence
- Narrow LINK_CONTEXT_PHRASES with object nouns (email/account) prevent false positives
- 31 new tests (21 unit + 10 integration), 376 total passing
- Update docs/api.md with new fields, null semantics, v1.5 gating notes
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-03-12 23:24:02 +08:00
胡绍康 and Copilot
7128edeaaa
feat: PRD-00008 P2 wait-message 异步探测解耦 — probe 缓存、后台轮询、333 测试全绿
...
- DB v6→v7:新增 external_probe_cache 表(状态/结果/过期时间)
- external_api.py:create_probe / get_probe_status / poll_pending_probes / cleanup
- wait-message 支持 mode=sync(P0 向下兼容)和 mode=async(P2 异步探测)
- 新增 GET /api/external/probe/<probe_id> 查询探测状态
- scheduler.py:注册 5 秒间隔的 external_probe_poll Job
- 新增 12 个 P2 测试(TC-PROBE-01~12),总计 333 测试全绿
- api.md:新增 probe 端点文档、更新 wait-message 双模式说明
- TODO-00008 P2 勾选完成
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-03-11 22:47:19 +08:00
胡绍康 and Copilot
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
胡绍康 and Copilot
085796eebe
fix: PRD-00008 P0 审查修复 — OpenAPI schema 一致性、审计日志补全、测试覆盖 51→303
...
- fix(openapi): VerificationCodeData 补齐 verification_link/links/formatted 字段
- fix(openapi): confidence 枚举修正为 [high, low](无 medium)
- fix(openapi): AccountStatusData 补 status 字段
- fix(openapi): VerificationLinkData 补 email 属性
- fix(controllers): verification-code/link/wait-message 异常路径补审计日志
- test: 新增 30 条 P0 测试(auth、param、error、schema、regression)
- test: 新增 11 条 P1 extractor 边界测试(TC-EXT-01~04)
- docs: TODO-00008 更新至 V1.1(P0 已完成)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-03-11 17:57:37 +08:00
胡绍康
bd9bafeb83
ci: harden quality gates and clean test warnings
2026-03-10 22:04:18 +08:00
胡绍康
1d4d848702
fix: align external api behavior with PRD-00008
2026-03-10 21:24:55 +08:00
胡绍康
3ebf9172bf
style: format external api changes for quality checks
2026-03-09 15:09:21 +08:00
胡绍康
9673b3524d
feat: add external api docs tests and verification updates
2026-03-09 15:07:18 +08:00