Skip to content

旧流程无法按错误性质决定是否重新渲染 - #7

Open
liumaker wants to merge 2 commits into
SoMarkAI:mainfrom
liumaker:fix/render-retry-recovery
Open

liumaker wants to merge 2 commits into
SoMarkAI:mainfrom
liumaker:fix/render-retry-recovery

Conversation

@liumaker

@liumaker liumaker commented Sep 8, 2026

Copy link
Copy Markdown

修改前重试行为与错误类型脱节;修改后确定性错误快速失败,临时错误最多恢复两次,并留下可供调用方诊断的尝试信息。

@liumaker
liumaker force-pushed the fix/render-retry-recovery branch from d2abd78 to 6ef238c Compare September 8, 2026 07:24

@Soul-Code Soul-Code 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.

提交组织问题:当前 #2 → #3 → #4 → #5 → #6 → #8 → #7 是一条累计提交链,但全部以 main 为 base,导致后一个 PR 包含前面全部修改,标题与实际审核范围不一致。请调整为独立 PR 或正确的 stacked PR;每个问题都应增加能够证明“main 失败、当前独立修改后通过”的最小回归测试。

我实际终止测试用 Chrome 后,当前实现能够重建渲染器并恢复到 F1=1.0,主要恢复流程有效。

但 Capture rectangle count mismatch 创建的 RenderResult 没有设置 error_type,_render_with_retries() 会把它当作不可重试错误,第一次失败后直接返回,与本 PR 的目标不一致。

请为该分支设置明确的可重试类型,并增加 WebDriver 断开、DOM/截图数量异常、确定性 KaTeX 错误和重试元数据的测试。

Comment thread fastcdm/render/render_worker.py Outdated
rects = self.get_rects()
cropped_imgs = []
if len(rects) != len(contents):
return [RenderResult(None, True, "Capture rectangle count mismatch", 0, 0) for _ in contents]

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.

这里没有设置 error_type,因此 _render_with_retries() 会把截图数量不一致当成不可重试错误并在第一次失败后返回。请标记为明确的可重试类型并补测试。

@liumaker
liumaker force-pushed the fix/render-retry-recovery branch from 6ef238c to 1fe50a9 Compare September 10, 2026 08:21
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.

2 participants