58 lines
1.6 KiB
Markdown
58 lines
1.6 KiB
Markdown
|
|
# T862 — sweep funnel counters and api
|
|||
|
|
|
|||
|
|
> Status: `done`(2026-08-11)
|
|||
|
|
> Milestone: `M6`
|
|||
|
|
> Est. change: `~180 lines`
|
|||
|
|
|
|||
|
|
## Goal
|
|||
|
|
|
|||
|
|
完成後 Sweep/Explore API 與列表可回傳完整 funnel、credit breakdown、failure/deferred reason,且數量語意可對帳。
|
|||
|
|
|
|||
|
|
## Depends on
|
|||
|
|
|
|||
|
|
- T860、T861、T800
|
|||
|
|
|
|||
|
|
## Inputs
|
|||
|
|
|
|||
|
|
- `apps/backend/internal/module/radar/domain/sweep.go`
|
|||
|
|
- `apps/backend/internal/logic/radar/list_sweeps_logic.go`
|
|||
|
|
- `apps/backend/internal/logic/radar/explore_opportunities_logic.go`
|
|||
|
|
- Spec §7.2、§7.6、驗收 #14、#15、#19
|
|||
|
|
|
|||
|
|
## Outputs
|
|||
|
|
|
|||
|
|
### 程式變更(預期路徑)
|
|||
|
|
|
|||
|
|
| 路徑 | 動作 | 說明 |
|
|||
|
|
|------|------|------|
|
|||
|
|
| `apps/backend/internal/module/radar/domain/sweep.go` | edit | counters/breakdown serialization |
|
|||
|
|
| `apps/backend/internal/logic/radar/list_sweeps_logic.go` | edit | owner list mapping |
|
|||
|
|
| `apps/backend/internal/logic/radar/explore_opportunities_logic.go` | edit | preview、ceiling、result stats |
|
|||
|
|
| `apps/web/src/data/live/radarRepos.ts` | edit | Sweep/Explore mapper |
|
|||
|
|
|
|||
|
|
### 行為變更
|
|||
|
|
|
|||
|
|
- `created` 不含 `merged`;`prefilter_rejected` 不含 AI judge;credits 分 search/demand_map/judge/reply。
|
|||
|
|
|
|||
|
|
### API / 契約(若有)
|
|||
|
|
|
|||
|
|
- list 維持 pagination/list、UTC ns、102000 success envelope。
|
|||
|
|
|
|||
|
|
## Out of scope
|
|||
|
|
|
|||
|
|
- 不做新前端 funnel 視覺(T823 已完成 mock)。
|
|||
|
|
|
|||
|
|
## Acceptance
|
|||
|
|
|
|||
|
|
- [x] API counters 與 repository domain 同數值。
|
|||
|
|
- [x] 失敗/partial 不回成功空 Sweep。
|
|||
|
|
- [ ] 指令:
|
|||
|
|
|
|||
|
|
```bash
|
|||
|
|
cd apps/backend && go test ./internal/logic/radar ./internal/module/radar -run 'Sweep|Explore' -count=1
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Notes
|
|||
|
|
|
|||
|
|
所有 credits_used 必須能回指既有 usage event source。
|