vault backup: 2026-04-06 16:23:54
This commit is contained in:
42
2 - Projects/Smart Support/Phase 3 Dev Log.md
Normal file
42
2 - Projects/Smart Support/Phase 3 Dev Log.md
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
created: 2026-04-06
|
||||
type: log
|
||||
project: "[[Smart Support]]"
|
||||
source: docs/phases/phase-3-dev-log.md
|
||||
tags:
|
||||
- dev-log
|
||||
- phase-3
|
||||
- openapi
|
||||
- ssrf
|
||||
- code-generation
|
||||
- llm-classification
|
||||
---
|
||||
|
||||
# Phase 3: OpenAPI Auto-Discovery -- Development Log
|
||||
|
||||
> Status: COMPLETED
|
||||
> Phase branch: `phase-3/openapi-discovery`
|
||||
> Date started: 2026-03-30
|
||||
> Date completed: 2026-03-30
|
||||
|
||||
## What Was Built
|
||||
|
||||
- **SSRF 防护** (`openapi/ssrf.py`): 私有 IP 拦截、DNS 重绑定防御、重定向链验证。162 行,42 个测试。
|
||||
- **规范获取** (`openapi/fetcher.py`): SSRF 安全获取,JSON/YAML 自动检测,10MB 限制。
|
||||
- **规范验证** (`openapi/validator.py`): 结构化 OpenAPI 3.0.x/3.1.x 验证。
|
||||
- **端点解析** (`openapi/parser.py`): $ref 解析、参数提取、自动 operationId。
|
||||
- **端点分类** (`openapi/classifier.py`): 启发式(GET=read)+ LLM 分类器 + Protocol 接口。失败回退启发式。
|
||||
- **审核 API** (`openapi/review_api.py`): 导入任务管理、分类审核、批准生成。180 行。
|
||||
- **代码生成** (`openapi/generator.py`): @tool 装饰 async 函数 + httpx。157 行。
|
||||
- **导入编排** (`openapi/importer.py`): fetch -> validate -> parse -> classify 全流程。
|
||||
|
||||
## Test Coverage
|
||||
|
||||
- New: 125 tests (118 unit + 7 integration)
|
||||
- Total: 322 tests
|
||||
- Coverage: 93.23%
|
||||
|
||||
## Related
|
||||
|
||||
- [[Smart Support]]
|
||||
- [[Smart Support/Phase 3 - OpenAPI 自动发现]]
|
||||
Reference in New Issue
Block a user