feat(t214): persist candidate observation identities

This commit is contained in:
QiuSW
2026-07-28 12:21:55 +08:00
parent acd3c85b5b
commit 56e7a2be33
29 changed files with 622 additions and 94 deletions
+30 -6
View File
@@ -498,9 +498,16 @@ SKU 伪装成图片检索词:
"title": "页面可见标题",
"sku_text": "BLACK-L",
"price": "189.00",
"product_url": "https://mobile.yangkeduo.com/goods.html?goods_id=example",
"image_url": "https://example.invalid/short-lived-image",
"evidence_asset_ids": ["7b733922-f90f-4bc4-a9ad-3e8ec4769122"],
"product_url": "",
"image_url": "",
"card_signature": "64-char-lowercase-hex",
"detail_signature": "64-char-lowercase-hex",
"detail_evidence_sha256": "detail-asset-64-char-lowercase-hex",
"specification_evidence_sha256": "specification-asset-64-char-lowercase-hex",
"evidence_asset_ids": [
"7b733922-f90f-4bc4-a9ad-3e8ec4769122",
"4095ea37-eb4f-47c7-989b-adf060e45a32"
],
"evaluation": {
"decision": "REVIEW",
"score": 0.82,
@@ -539,8 +546,14 @@ SKU 伪装成图片检索词:
`recommendation` 只能指向颜色和尺码均为 `MATCH`、分数和置信度均不低于 `0.75`
且没有拒绝原因的原始 ordinal;没有满足项时只省略 recommendation,不能删除原始
候选。后端在同一事务内写入 search run、observation、model evaluation 和
recommendation,并保留旧 JSON 审计副本;不请求 `product_url` 或 `image_url`,
主要证据必须是已鉴权 asset。
recommendation,并保留旧 JSON 审计副本。每个非空候选必须按
`DETAIL`、`SPECIFICATION` 顺序绑定两个不同的 evidence asset ID,且两个声明哈希
必须分别等于后端保存的实际 asset 哈希;卡片和详情语义签名也必须是小写 SHA-256。
后端用版本化的 execution、原 ordinal、详情签名和规格证据哈希生成稳定的
execution-scoped `candidate_key`。Admin 任务详情在 observation 的 `identity` 中
返回该 key、四个指纹及 identity 版本;旧 v6 observation 可没有 identity。
`product_url` 和 `image_url` 只有设备实际取得可信 URL 时才提交,不能伪造;后端不
请求这些 URL,主要证据必须是已鉴权 asset。
### `POST /api/v1/tasks/{task_id}/human-reviews`
@@ -598,8 +611,19 @@ recommendation,并保留旧 JSON 审计副本;不请求 `product_url` 或 `i
"candidate": {
"ordinal": 1,
"title": "页面可见标题",
"sku_text": "BLACK-L",
"price": "189.00",
"evidence_asset_ids": ["7b733922-f90f-4bc4-a9ad-3e8ec4769122"]
"product_url": "",
"image_url": "",
"card_signature": "64-char-lowercase-hex",
"detail_signature": "64-char-lowercase-hex",
"detail_evidence_sha256": "detail-asset-64-char-lowercase-hex",
"specification_evidence_sha256": "specification-asset-64-char-lowercase-hex",
"evidence_asset_ids": [
"7b733922-f90f-4bc4-a9ad-3e8ec4769122",
"4095ea37-eb4f-47c7-989b-adf060e45a32"
],
"evaluation": null
},
"order_submitted": false
}