feat(t225): freeze Go ERP protocol contract
This commit is contained in:
+15
-5
@@ -4,7 +4,7 @@ title: 冻结 Go 直连 ERP 协议与安全边界
|
||||
phase: 2
|
||||
deps:
|
||||
- T-224
|
||||
status: TODO
|
||||
status: DONE
|
||||
created: 2026-07-29
|
||||
context_ref: d62a4af
|
||||
work_branch: null
|
||||
@@ -14,6 +14,9 @@ write_paths:
|
||||
- docs/04-architecture.md
|
||||
- docs/05-coding-rules.md
|
||||
- docs/integrations/shunyunbao-contract.md
|
||||
- docs/current-state.md
|
||||
- backend-api/internal/domain/freight_source_errors.go
|
||||
- backend-api/internal/usecase/freight_service.go
|
||||
- backend-api/internal/platform/shunyunbao/**
|
||||
- backend-api/internal/platform/erpconnector/**
|
||||
---
|
||||
@@ -47,10 +50,10 @@ Python 环境、loopback 端口和与 Go 后端相同的服务密钥。当前 `E
|
||||
|
||||
## 验收要点
|
||||
|
||||
- [ ] Go fixture 测试固定请求 header、查询条件、分页、详情批量和 allowlist 归一化。
|
||||
- [ ] 负向测试证明 PII、Cookie、JWT、账号、密码和验证码不会出现在输出或错误中。
|
||||
- [ ] 取消 OCR、Redis 和 Python HTTP 服务作为 Go 第一版运行时依赖的设计。
|
||||
- [ ] 不访问线上 ERP;现有 Python Connector 仍可继续运行,货运导入行为不改变。
|
||||
- [x] Go fixture 测试固定请求 header、查询条件、分页、详情批量和 allowlist 归一化。
|
||||
- [x] 负向测试证明 PII、Cookie、JWT、账号、密码和验证码不会出现在输出或错误中。
|
||||
- [x] 第一版 Go 设计不依赖 OCR、Redis 或 Python HTTP 服务。
|
||||
- [x] 未访问线上 ERP;现有 Python Connector 仍可继续运行,货运导入行为不改变。
|
||||
|
||||
## 边界
|
||||
|
||||
@@ -61,3 +64,10 @@ Python 环境、loopback 端口和与 Go 后端相同的服务密钥。当前 `E
|
||||
## 执行记录
|
||||
|
||||
- 2026-07-29:由 `d62a4af` 创建,等待 T-224 后开始。
|
||||
- 2026-07-29:开始实施;已核对现有脱敏 Python 契约和 T-224 异步导入边界,未访问线上 ERP。
|
||||
- 2026-07-29:新增 Go 协议常量、header/payload 构造、脱敏 fixture 归一化与来源中立错误;
|
||||
运行时仍装配 Python Connector,未改 Admin 页面、schema 或同步异步边界。
|
||||
- 验证:在 `backend-api/` 执行 `$env:GOTOOLCHAIN='local'; go test ./...; go test -race ./...;`
|
||||
`go vet ./...; go build ./cmd/api; go build ./cmd/migrate; go build ./cmd/authctl`,全部通过;
|
||||
未访问线上 ERP。
|
||||
- 未验证项:真实顺运宝登录和查询有意留给 T-226/T-227,并需要人员配置凭证和完成验证码。
|
||||
|
||||
Reference in New Issue
Block a user