fix(export): 脚线几何由后端报出,前端不再自己按 0.92 算 - #524
Open
johnnyzhang-eng wants to merge 1 commit into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
| # 落位几何随产物一起交出:消费方要把帧画到画布上、判角色有没有站在地上, | ||
| # 而这条线的比例是对齐那一步的实参。前端此前抄了一份 0.92 自己算 —— 两份 | ||
| # 常数只要有一次不同步,角色就不站在地上,而没有任何一道会红。 | ||
| if generated.geometry is not None: |
Contributor
There was a problem hiding this comment.
[P1] 保留持久化任务中的 geometry
_produce_action 将 geometry 写入结果后,任务落库再由 task_repo._deserialize_result 还原 CharacterActionOutput 时并没有读取这个新字段,因此通过查询接口或断线后的轮询拿到的已完成任务会变成没有 geometry 的结果。前端随后会走本次改动中的旧值回落路径,实际导出仍按 0.92 计算,只有实时事件路径才使用后端报出的几何;请在反序列化时恢复 geometry(并覆盖持久化/重新读取场景)。
xyh202131
previously approved these changes
Aug 21, 2026
引擎把对齐那一步的实参报进出参、服务端随结果交出;前端导出改读它,缺失时 明示回落而不静默给 0。 Closes 1024XEngineer#522
johnnyzhang-eng
force-pushed
the
fix/report-sequence-geometry
branch
from
August 21, 2026 10:23
0f0c00b to
ca77089
Compare
xyh202131
approved these changes
Aug 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #522
问题
交付帧的脚线几何前后端各存一份 0.92。后端
postprocess/pack.py的模块注释已经写明为什么它必须是单一常量 ——「抄一份数字过去就等于埋下『改了这里、那边阈值不动』的静默分歧」,而前端导出正是抄了一份,anchor与footY都由它算,后端从不交出真值。两份不同步的后果是角色不站在地上,而帧数、时长、成色全部正常,没有任何一道会红。导出契约里这两个字段是必填且带范围校验的(
footY必须落在画布内),是引擎播放要用的量,不是装饰。方案
引擎新增
SequenceGeometry(画布尺寸、归一化锚点、脚线像素),值取自_lastmile调用对齐时的同一组实参与postprocess.FOOT_LINE,不另立一份常量。服务端把它转录进任务结果的geometry。前端结果类型加同名可选字段,DTO 层按结构严格校验(
anchor必须是 0-1、foot_y必须落在画布内);导出改读它,缺失时明示回落到旧常量而不是静默给 0 —— 旧任务没有这一段,把「没给」读成「给了默认值」正是这条线要消掉的问题。出参上它是
None可选而不是带默认值:消费方要能区分「引擎没报」与「报了这个值」。不包含
character_data存储:已发布动作仍走回落,那需要CharacterAction一起加字段,属 feat(render3d): 三渲二路线接入编排模块 #192 子项 1 的另一半验收
后端用例断言的是
postprocess.FOOT_LINE本身,不是字面量 0.92:前端两条用例:一条给故意不等于 0.92 的几何(
anchor.y = 0.8、footY = 32),读出来必须是后端那份;一条不给几何,验回落值可测。删掉「优先用后端几何」那一步后前端用例失败:后端
ruff check .、lint-imports(2 kept, 0 broken)、pytest -q(1200 passed, 14 skipped)。前端tsc -b、oxlint、oxfmt --check、vitest(974 passed)。