fix: 修复 PDD 页面误判与失败回执 (#35)
This commit is contained in:
@@ -217,6 +217,20 @@ Idempotency-Key: <task_id>:<attempt_id>:failure-v1
|
||||
采集任务失败时,同步把 `pdd_products.collect_status` 置 `failed`,
|
||||
错误信息写进 `collect_msg`、诊断产物位置写进 `artifact_ref`,界面上要看得见。
|
||||
|
||||
成功响应:
|
||||
|
||||
```json
|
||||
{
|
||||
"accepted": true,
|
||||
"result_id": "result-uuid",
|
||||
"task_status": "assigned",
|
||||
"accepted_at": "2026-08-06T08:03:01Z"
|
||||
}
|
||||
```
|
||||
|
||||
`[必须]` `result_id` 非空,并与同一幂等键保存的响应一起返回。失败提交也使用
|
||||
Client `SubmissionReceipt` 的统一确认字段,不能只返回 `task_status`。
|
||||
|
||||
`[必须]` §4.1 的无条件接受**同样适用于本接口**。
|
||||
|
||||
## 6. 幂等怎么做
|
||||
|
||||
@@ -355,6 +355,21 @@ Idempotency-Key: task-id:attempt-id:failure-v1
|
||||
|
||||
`status` 只能是 `retry_wait`、`manual_review`、`failed` 或 `cancelled`。
|
||||
|
||||
成功响应与结果接口使用同一种确认结构,并额外返回任务状态:
|
||||
|
||||
```json
|
||||
{
|
||||
"accepted": true,
|
||||
"result_id": "result-uuid",
|
||||
"task_status": "assigned",
|
||||
"accepted_at": "2026-08-06T08:03:01Z"
|
||||
}
|
||||
```
|
||||
|
||||
`[必须]` `result_id` 非空。旧 Admin 已经写入幂等表、但没有 `result_id` 的
|
||||
历史失败响应,Client 可按 `accepted + task_status + accepted_at` 兼容一次,
|
||||
避免把已经接收的数据误报为拒绝。
|
||||
|
||||
规则:
|
||||
|
||||
- `[必须]` §6.1 的无条件接受规则同样适用于本接口。
|
||||
|
||||
Reference in New Issue
Block a user