thread-master/docs/product/growth-loop/tasks/T311-outcome-hooks-scout-ou...

52 lines
1.1 KiB
Markdown
Raw Normal View History

2026-07-23 05:56:42 +00:00
# T311 — outcome-hooks-scout-outbox-publish
> Status: `done`
> Milestone: `M1`
> Kind: `feat`
> Est. change: `~160 lines`
## Goal
完成後系統應Scout 外展 published標記完成、Outbox step published 時自動建立 OutcomeEventobservingwindow=72h
## Depends on
- T310
## Inputs
- Spec`../spec.md` §4.1、OC-01
- 既有scout outreach、outbox worker publish 成功路徑
## Outputs
| 路徑 | 動作 | 說明 |
|------|------|------|
| `apps/backend/internal/**/scout/**` | edit | hook on publish/mark done |
| `apps/backend/internal/**/outbox/**` 或 worker | edit | hook on step published |
| `apps/backend/internal/**/outcome/**` | edit | CreateFromSource |
### 行為變更
- draft/new/skipped **不**建 Outcome
- 冪等:同一 source 不重複建(或更新同一筆)
## Out of scope
- 自動訊號觀測T312
- FE
## Acceptance
- [ ] SpecOC-01
- [ ] Test`TestOC_01_CreateOnPublished`
- [ ] 指令:
```bash
cd apps/backend && go test ./internal/... -run OC_01|OutcomeHook -count=1
```
## Notes