Skip to content

fix(quick-start): recover failed directions in one retry - #811

Open
huyanxius wants to merge 4 commits into
1024XEngineer:mainfrom
huyanxius:fix/808-action-direction-retry
Open

fix(quick-start): recover failed directions in one retry#811
huyanxius wants to merge 4 commits into
1024XEngineer:mainfrom
huyanxius:fix/808-action-direction-retry

Conversation

@huyanxius

Copy link
Copy Markdown
Collaborator

Quick Start 现在会一次补跑同一动作中所有失败方向,同时保留已经成功的方向,避免用户手动判断并排序多个内部重试。

Why

生产中的多方向动作生成在上游限流和线路异常后出现了部分方向失败。原实现一旦某个方向进入重试,节点就会回到生成态,后续失败方向会被 Controller 拒绝,用户看到多个重试入口却无法可靠完成恢复。

Changes

  • 将同一节点的失败方向合并为一个重试入口,按顺序补跑当前全部失败方向。
  • 保留已成功方向和最新 WorkflowRun;单次补跑仍失败时继续尝试剩余方向并保留重试入口。
  • 明确提示已完成方向不会丢失,并提供统一的进行中反馈。
  • Controller 仅在目标方向任务快照确实为 failed 时,允许生成中节点继续补跑该方向。

Implementation

  • Quick Start 按 nodeId 聚合失败方向,顺序调用现有 retryGenerationDirection,避免并发写入 WorkflowRun 版本冲突。
  • Controller 不放宽普通生成任务:active/generating 状态下仍会读取目标任务快照,只有 failed 才能重新生成。
  • 不增加无限自动重试,也不改变 Gateway 路由、付费调用边界或数据模型。

Verification

  • npm test -- src/features/workflow-controller/controller.test.ts src/pages/quick-start/index.test.tsx:2 个测试文件、242 个测试通过。
  • npm run typecheck:通过。
  • npx oxlint src/features/workflow-controller/controller.ts src/features/workflow-controller/controller.test.ts src/pages/quick-start/index.tsx src/pages/quick-start/index.test.tsx:通过。
  • npx oxfmt --check src/features/workflow-controller/controller.ts src/features/workflow-controller/controller.test.ts src/pages/quick-start/index.tsx src/pages/quick-start/index.test.tsx:通过。
  • npm run build:通过;仅有既有分块体积提示。
  • git diff --check:通过。
  • 浏览器验收与截图:未执行(用户明确要求跳过)。

Scope

  • 本 PR 不包含:Gateway 重试策略、模型供应商路由、计费逻辑、数据结构、页面布局重设计或生产部署。
  • 后续事项:合并后再按生产发布流程同步,不把未合并代码直接部署到现网。

Related Issues

Closes #808

A direction retry could lock sibling failures once the node returned to generating.

Permit retries during generation only when the referenced task snapshot is failed.

Users can continue recovering the same action without replacing completed directions.
The controller regression needs to preserve retries after one direction starts generating.

Exercise two failed sibling snapshots while the node remains active and generating.

The test prevents direction recovery from returning to the previous state lock.
Separate retry buttons forced users to coordinate internal direction state manually.

Group failures by node, retry them sequentially, and preserve the latest successful run.

One recovery action now keeps completed directions and reports any remaining failure.
Quick Start needs a regression for the single-action recovery experience.

Verify sequential retries, the shared busy label, and the preserved-results guidance.

The test guards the user-facing path that previously required manual retry ordering.
@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
windup Ready Ready Preview Aug 27, 2026 5:46am

@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.48148% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...end/src/features/workflow-controller/controller.ts 57.14% 1 Missing and 2 partials ⚠️
frontend/src/pages/quick-start/index.tsx 90.00% 0 Missing and 2 partials ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #811      +/-   ##
==========================================
- Coverage   87.07%   87.06%   -0.01%     
==========================================
  Files         288      288              
  Lines       21520    21536      +16     
  Branches     3294     3300       +6     
==========================================
+ Hits        18738    18750      +12     
- Misses       1856     1857       +1     
- Partials      926      929       +3     
Flag Coverage Δ
backend 91.68% <ø> (+<0.01%) ⬆️
frontend 81.58% <81.48%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
frontend/src/pages/quick-start/index.tsx 84.27% <90.00%> (+0.06%) ⬆️
...end/src/features/workflow-controller/controller.ts 83.13% <57.14%> (-0.24%) ⬇️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

已检查 Controller 放宽条件、Quick Start 按节点顺序补跑、失败方向聚合及相关回归测试。顺序补跑的成功路径与单方向失败提示覆盖完整,但部分成功后后续方向提交失败时,页面可能丢失继续恢复入口。

验证:git diff --check 通过;尝试运行两个聚焦测试文件时,当前环境中的 vitestPermission denied 未能启动。

Comment thread frontend/src/pages/quick-start/index.tsx
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.

fix(quick-start): recover all failed action directions in one retry

2 participants