上线版: 产品表单统一+form嵌套修复+用户管理+部署+三套叙事
- 产品编辑入口统一走 ProductFormFull(卖点/风格/人群/品牌词全字段); 修复开任务页 <form> 套 <form> 致"编辑产品"报错、改不了、跳回首个产品 - dashboard 入口卡片对齐实际路由: 系统管理(/config) 与 工作配置(/settings) 分开; settings ?tab=products 直达改用挂载后读 URL, 消除 hydration mismatch - 新增用户管理(users API/admin service/改密页) + alembic 022/023/024 - 上线部署: Dockerfile / docker-compose.prod+https / nginx https / .env.example - A8 三套正交叙事(痛点/场景/成分背书) + beige 调色去AI化 + 飞轮 text_import 高权重信号 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -34,6 +34,7 @@ def replenish_text_candidates(self, task_id: int) -> dict:
|
||||
from app.workers.pipeline_steps import (
|
||||
load_task_and_product,
|
||||
decrypt_user_key,
|
||||
decrypt_codeproxy_key,
|
||||
build_clients_and_clear_key,
|
||||
build_product_dict,
|
||||
load_flywheel_context,
|
||||
@@ -57,8 +58,10 @@ def replenish_text_candidates(self, task_id: int) -> dict:
|
||||
|
||||
workspace_id = task.workspace_id
|
||||
plain_key = decrypt_user_key(db, task.operator_id, workspace_id)
|
||||
clients = build_clients_and_clear_key(plain_key)
|
||||
alt_key = decrypt_codeproxy_key(db, task.operator_id, workspace_id)
|
||||
clients = build_clients_and_clear_key(plain_key, alt_key)
|
||||
plain_key = None # 用完即清除,基石B
|
||||
alt_key = None
|
||||
product_dict = build_product_dict(product)
|
||||
flywheel_fragment, _ = load_flywheel_context(
|
||||
db, workspace_id, task.product_id, product_dict
|
||||
@@ -71,7 +74,7 @@ def replenish_text_candidates(self, task_id: int) -> dict:
|
||||
current = existing
|
||||
while current < target and rounds < MAX_REPLENISH_ROUNDS:
|
||||
rounds += 1
|
||||
run_text_generation(
|
||||
_, _, _, fail_reason, _ = run_text_generation(
|
||||
db, clients, task, product_dict, flywheel_fragment,
|
||||
_push_event_sync, workspace_id, seq,
|
||||
)
|
||||
@@ -85,6 +88,11 @@ def replenish_text_candidates(self, task_id: int) -> dict:
|
||||
"补充轮 %d: task_id=%s 库内合格=%d/%d",
|
||||
rounds, task_id, current, target,
|
||||
)
|
||||
# 评分通道不可用时再补也是空烧 token(每轮还各 35s backoff)——立即停,
|
||||
# 等通道恢复用户手动重试。区别于"质量不达标"(那个值得多补几轮)。
|
||||
if fail_reason == "scoring_unavailable":
|
||||
logger.error("补充中止: task_id=%s 评分通道不可用,停止空跑重试", task_id)
|
||||
break
|
||||
|
||||
return {
|
||||
"task_id": task_id,
|
||||
|
||||
Reference in New Issue
Block a user