49 lines
1.3 KiB
Markdown
49 lines
1.3 KiB
Markdown
|
|
# T734 — ownership legacy domain integration
|
|||
|
|
|
|||
|
|
> Status: `done`
|
|||
|
|
> Milestone: `M3` · Phase C
|
|||
|
|
> Kind: `test` · Est. change: `~180 lines`
|
|||
|
|
|
|||
|
|
## Goal
|
|||
|
|
|
|||
|
|
以整合測試證明 product domain 不破壞舊資料,並阻擋跨 owner 與錯誤父子關係。
|
|||
|
|
|
|||
|
|
## Depends on
|
|||
|
|
|
|||
|
|
- T730、T731、T732、T733
|
|||
|
|
|
|||
|
|
## Inputs
|
|||
|
|
|
|||
|
|
- `../spec.md` 驗收 #1、#7、#10、#12、#13
|
|||
|
|
- T703 fixtures
|
|||
|
|
|
|||
|
|
## Outputs
|
|||
|
|
|
|||
|
|
| 路徑 | 動作 | 說明 |
|
|||
|
|
|------|------|------|
|
|||
|
|
| `apps/backend/internal/module/radar/usecase/product_domain_integration_test.go` | add | legacy、owner、parent、snapshot cases |
|
|||
|
|
| `apps/backend/internal/logic/radar/product_contract_test.go` | edit | envelope/not-found safety |
|
|||
|
|
|
|||
|
|
## Behavior
|
|||
|
|
|
|||
|
|
- 舊 watch/opportunity 可 list/get/accept,不被回填。
|
|||
|
|
- 他人 ID 回安全錯誤,不含對方名稱。
|
|||
|
|
- 同貼文兩 Product 仍只有一 Opportunity。
|
|||
|
|
|
|||
|
|
## Out of scope
|
|||
|
|
|
|||
|
|
- scorer 與每日 sweep
|
|||
|
|
- frontend
|
|||
|
|
|
|||
|
|
## Acceptance
|
|||
|
|
|
|||
|
|
- [x] legacy、owner isolation、multi-product single-opportunity cases are named tests.
|
|||
|
|
|
|||
|
|
```bash
|
|||
|
|
cd apps/backend && make test-integration
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
Implementation result (2026-08-10): added memory integration coverage for legacy
|
|||
|
|
generic reads, cross-owner denial, two ProductMatches on one Opportunity, and
|
|||
|
|
same-product source merging without snapshot rewrite.
|