Files
meida_backend/packages/tryon/README.md
T
xsl 7c67506474 feat(domains): identity, billing, task services and domain placeholders
Billing implements reserve -> commit -> refund against bl_quota and bl_ledger
with row-level locking and idempotency keys; the refund commits on its own
transaction so a failed request cannot silently keep a user's quota. Task
implements the unified task centre over the state machine. Identity issues and
resolves users. Remaining domains are placeholders whose READMEs state what
belongs there and what must not.
2026-08-14 00:26:39 +08:00

20 lines
939 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# `packages/tryon/` — 智能试穿与发型(占位)
**职责**(架构 §4.1):业务编排、素材校验、结果管理。
**不负责**:GPU 推理(调 `services/tryon`)。
## 待实现
- 表:`tr_task`(与 `tk_task` 一对一)、`tr_favorite`
- 架构 §7.3 的八步链路;FR-TRY-01~08、FR-HAIR-01~04
## 关键约束
- **前置校验发生在预扣之前**(FR-TRY-02):单品必须 `tryon_ready`,人像质量
不达标要在提交前拦截,**不消耗配额**。
- **队列即容量**(§7.3):`gpu` 队列并发上限由 GPU 容量决定,把排队位次与
预估等待返回给用户。超过阈值直接拒绝新任务 —— 这比让用户等 10 分钟体验更好。
- 失败要区分可重试(网络/排队超时)与不可重试(输入非法/审核拒绝),
后者立即退点。
- 结果图必须经统一合规出口(水印 + 元数据 + 内容编号,CR-05)。