Files
meida_backend/packages/report
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
..

packages/report/ — 美学报告(占位)

职责(架构 §4.1):触发判定、生成编排、版本管理、分享。 不负责:具体的视觉分析与文案生成(调 AI 能力层)。

待实现

  • 表:rp_report rp_input rp_share
  • 架构 §7.1 的 24 步生成链路(这是全系统最复杂的一条)

这条链路上不能妥协的四件事

  1. 原图生命周期:直传 COS 临时桶 → Worker 拉取 → 第 14 步显式删除 → 桶级 2 小时生命周期兜底(TD-20 / CR-02)。rp_input 只存派生特征与图片元信息。
  2. 失败即退款:任何步骤失败 → tk_task 转 failed → billing.refund()。
  3. 分步可恢复:视觉分析结果必须落中间态,LLM 或渲染失败时不重跑视觉分析 (也就不需要用户重新上传)。
  4. 生成后校验不可跳过:禁忌违反、色值在板内、维度引用存在、无医疗/贬损表述。 最多重试 2 次,仍失败降级为规则直出模板文案,绝不放行违规内容。