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.
939 B
939 B
packages/tryon/ — 智能试穿与发型(占位)
职责(架构 §4.1):业务编排、素材校验、结果管理。
不负责:GPU 推理(调 services/tryon)。
待实现
- 表:
tr_task(与tk_task一对一)、tr_favorite - 架构 §7.3 的八步链路;FR-TRY-01
08、FR-HAIR-0104
关键约束
- 前置校验发生在预扣之前(FR-TRY-02):单品必须
tryon_ready,人像质量 不达标要在提交前拦截,不消耗配额。 - 队列即容量(§7.3):
gpu队列并发上限由 GPU 容量决定,把排队位次与 预估等待返回给用户。超过阈值直接拒绝新任务 —— 这比让用户等 10 分钟体验更好。 - 失败要区分可重试(网络/排队超时)与不可重试(输入非法/审核拒绝), 后者立即退点。
- 结果图必须经统一合规出口(水印 + 元数据 + 内容编号,CR-05)。