Skip to content

fix: resolve issue #96 - #97

Open
Jackkp0t wants to merge 1 commit into
helsome:mainfrom
Jackkp0t:fix/issue-96
Open

fix: resolve issue #96#97
Jackkp0t wants to merge 1 commit into
helsome:mainfrom
Jackkp0t:fix/issue-96

Conversation

@Jackkp0t

Copy link
Copy Markdown

改动说明

修复计划自动化规则在同一计划日期可能重复执行的问题。

  • 执行前持久化声明 ruleId + scheduled occurrence,应用重启后仍可识别已处理任务。
  • 在异步持久化前设置内存 guard,避免后续 scheduler tick 并发触发同一规则。
  • 自动化运行记录写入时保留已声明的计划 occurrence。
  • 失败的计划任务不会在同一天后续 tick 自动重试。
  • 新增重启恢复、并发 tick、失败不重试及持久化声明测试。

关联 Issue

Closes #96

测试报告(正式审核前必填)

环境

  • Bun:1.4.2
  • OS:Windows

实际执行命令与结果

C:\Users\jackpot\.bun\bin\bun.exe test packages/shared/src/automation/rules-repository.test.ts
→ 7 passed / 0 failed
→ Ran 7 tests across 1 file.

C:\Users\jackpot\.bun\bin\bun.exe test apps/electron/src/main/kernelHost.test.ts
→ 12 passed / 0 failed
→ Ran 12 tests across 1 file.

C:\Users\jackpot\.bun\bin\bun.exe run typecheck
→ @finagent/core / @finagent/i18n / @finagent/shared /
  @finagent/ui / @finagent/electron 全部 exit 0

Set-Location apps/electron
C:\Users\jackpot\.bun\bin\bun.exe run typecheck
→ tsc --noEmit exit 0

git diff --check
→ exit 0

已知失败 / Baseline(如有)

无。

  • 已提供实际测试命令与 pass/fail 结果
  • 已说明测试环境
  • 如果存在已知 baseline / 环境失败,已提供 main 对照或说明
  • 核心改动已有对应 focused test / smoke / integration 验证

UI 截图(仅可见 UI 变化时必填)

  • 本 PR 无可见 UI 变化(无需截图)
  • 本 PR 有可见 UI 变化,已提供修改后的 UI 截图
  • 已提供 Before / After 对比截图(适用时)

Before(适用时)

不适用(无可见 UI 变化)。

After(适用时)

不适用(无可见 UI 变化)。

Scope / 后续

本 PR 仅处理计划自动化的同日去重、重启恢复与并发执行保护;不修改自动化规则配置、手动执行行为或 UI。

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.

[Automation] Scheduled rules can run more than once on the same day

1 participant