1.4 KiB
1.4 KiB
T740 — product context snapshot loader
Status:
done
Milestone:M4· Phase C
Kind:feat· Est. change:~170 lines
Goal
從同 owner 的 Brand/Product 載入產品判定上下文並建立不可回寫舊商機的版本快照。
Depends on
- T734
Inputs
- Scout Brand/Product domain repositories
../spec.md§3.1、§3.3、§4.2
Outputs
| 路徑 | 動作 | 說明 |
|---|---|---|
apps/backend/internal/module/radar/usecase/product_context.go |
add | owner/parent validation、snapshot construction |
apps/backend/internal/module/radar/usecase/service.go |
edit | 注入 Brand/Product source interface |
apps/backend/internal/module/radar/usecase/product_context_test.go |
add | missing/wrong owner/version snapshot |
Behavior
- snapshot 只含判定與歷史解釋必要資料及 source updated_at。
- Product 不存在/錯 Brand 明確失敗;不得退回 ServiceProfile product fit。
- ServiceProfile 只提供選用 regions/remote/forbidden/tone。
Out of scope
- 建議詞與 scoring
- watch auto pause(T755)
Acceptance
- 更新 Product 後新 snapshot 改版,舊 snapshot fixture 不變。
cd apps/backend && go test ./internal/module/radar/usecase/... -count=1
Implementation result (2026-08-10): added a read-only Scout catalog bridge, owner/parent validation, and immutable Brand/Product context snapshots with source updated-at versions.