Skip to content

feat(quality-ledger): 生成成色与提示词版本落库 - #322

Open
johnnyzhang-eng wants to merge 1 commit into
1024XEngineer:mainfrom
johnnyzhang-eng:feat/quality-ledger-v2
Open

feat(quality-ledger): 生成成色与提示词版本落库#322
johnnyzhang-eng wants to merge 1 commit into
1024XEngineer:mainfrom
johnnyzhang-eng:feat/quality-ledger-v2

Conversation

@johnnyzhang-eng

Copy link
Copy Markdown
Contributor

Refs #311

改了什么

  • slicing/quality.py 新增 subject_blobs()(逐帧统计画面里"够大"的连通块数,4-连通游程并查集实现,不依赖 scipy)
  • ports/__init__.py:ActionQualitysubject_blobs 字段;GeneratedActionprompt_version 字段(均无默认值,逼调用方显式带出)
  • prompt/__init__.py 新增 PROMPT_VERSION 常量
  • impl/character_generator.py_assess() 填上 subject_blobs,generate() 出参带上 prompt_version
  • orchestrator/executor.py/model.py/task_repo.py:成色(dataclasses.asdict)与 prompt_version 落进任务结果并可反序列化读回
  • test_subject_blobs.py(六种合成掩码校准连通性边界)+ 既有测试补齐新增字段的构造/端到端断言

为什么

引擎已经算出成色(ActionQuality),但 executor 组装结果时整个丢掉,任务无条件 COMPLETED——无法回答"上次改提示词到底有没有变好",也无法区分"每帧都一样的 walk"与"步态干净的 walk"。

subject_blobs 补的是 motion_scale/dead_frames/loop_seam 共同的盲区:三者都只看"帧与帧之间变了多少",一个稳定存在的额外主体(母版/提示词让引擎多画出一个角色)不影响它们任何一个读数。

本 PR 只记账,不做判决——不因为成色差就置 FAILED,交付/重试仍是下游按阈值决定的产品决策。

怎么验证的

backend/ 下:

  • uv run ruff check . — All checks passed
  • uv run lint-imports — Contracts: 2 kept, 0 broken
  • uv run pytest -q — 689 passed, 14 skipped

引擎已算出 ActionQuality 但 executor 组装结果时整个丢掉,任务无条件
COMPLETED,无法回答改提示词有没有变好。

新增 subject_blobs(逐帧主体连通块计数,4-连通,不依赖 scipy)补上
motion_scale/dead_frames/loop_seam 测不出的多出一个主体这类病;
成色(含 subject_blobs)与 prompt_version 落进任务结果,只记账不判决,
交付/重试仍是下游按阈值决定。
@vercel

vercel Bot commented Aug 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
windup Ignored Ignored Preview Aug 14, 2026 9:54am

@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review conclusion

The quality-ledger path is coherent across the fixed diff: subject_blobs() is exported and measured on aligned delivery frames, ActionQuality and GeneratedAction carry the new required fields, and the executor/task repository preserve them through JSON persistence and read-back. The added calibration and orchestration tests cover the key connectivity boundaries and end-to-end accounting contract. I did not identify an actionable correctness or regression issue in the changed code.

Verification

  • git diff --check passed.
  • python3 -m compileall -q packages tests passed.
  • Targeted pytest execution was unavailable because this environment does not provide uv or the installed Pillow dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant