Skip to content

fix(desktop): 稳定工作流信任哈希#25

Merged
earayu merged 1 commit into
mainfrom
codex/stable-workflow-trust-hash
May 28, 2026
Merged

fix(desktop): 稳定工作流信任哈希#25
earayu merged 1 commit into
mainfrom
codex/stable-workflow-trust-hash

Conversation

@earayu
Copy link
Copy Markdown
Collaborator

@earayu earayu commented May 28, 2026

背景

3F 本地验证确认:#24 后创建弹窗不再报 Error generating deeplink,保存自有工作流成功,但保存后运行仍弹“新工作流警告”。

问题

同一个自有工作流,保存时记录的 hash 和从 YAML/list 读回后的运行时 recipe hash 不一致。

根因

信任 hash 使用 JSON.stringify(recipe)。前端保存对象和 Rust 后端从 YAML 读回来的对象字段顺序/形态可能不同,导致语义相同的工作流 hash 不稳定。

方案

验收

  • pnpm -C ui/desktop exec vitest run src/utils/stableRecipeHash.test.ts 通过
  • pnpm -C ui/desktop exec eslint src/utils/stableRecipeHash.ts src/utils/stableRecipeHash.test.ts src/utils/recipeHash.ts src/main.ts --max-warnings 0 --no-warn-ignored 通过
  • git diff --check 通过

@earayu earayu merged commit 810144e into main May 28, 2026
20 checks passed
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