Skip to content

fix(automation): 补齐组合情报无实质变化运行路径 - #134

Open
CC1227871 wants to merge 3 commits into
helsome:mainfrom
CC1227871:fix/issue-103-no-material-update
Open

CC1227871 wants to merge 3 commits into
helsome:mainfrom
CC1227871:fix/issue-103-no-material-update

Conversation

@CC1227871

@CC1227871 CC1227871 commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

本次改动

  • 为自动化运行记录保存明确结果和本次证券范围快照;组合快照保留来源抓取时间。
  • 仅当范围非空且全部证券评估完整(包括有效前收盘价)时,才判定“未发现实质变化”;数据缺失或评估失败会标为“运行未完成”。
  • 日报只统计当日每条规则最新一次成功的无变化运行,不生成虚假的关注事项;规则卡片显示本地化运行状态。

原分支验证报告

环境:Bun 1.4.2;Windows 11 家庭中文版(10.0.22621,Build 22621)。

验证项 可复现命令 结果
自动化核心、日报逻辑与仓库 bun test --isolate packages/shared/src/automation/runner.test.ts packages/shared/src/automation/brief.test.ts packages/shared/src/automation/rules-repository.test.ts 38 pass,0 fail,0 skip;退出码 0
自动化管理界面 bun test --isolate packages/ui/src/components/automation/AutomationRulesView.test.tsx 5 pass,0 fail,0 skip;退出码 0
日报界面 bun test --isolate packages/ui/src/components/today/DailyBriefSection.test.tsx 4 pass,0 fail,0 skip;退出码 0
Electron 主进程接线 bun test --isolate apps/electron/src/main/kernelHost.test.ts 11 pass,0 fail,0 skip;退出码 0
Core 类型检查 bun run --filter '@finagent/core' typecheck 通过;退出码 0
UI 类型检查 bun run --filter '@finagent/ui' typecheck 通过;退出码 0
中英文案键校验 bun run i18n:check 通过;en-US 与 zh-CN 各 1487 个键,0 issues;退出码 0

最新 main 合并态复验(2026-09-21)

已将原 PR head e740bc1 与最新 upstream/main f0f4643 合并;无冲突,更新提交为 71e4b24。环境:Bun 1.4.2;Windows 11 家庭中文版(10.0.22621,Build 22621)。

验证项 命令 结果
自动化核心、日报逻辑与仓库 bun test --isolate packages/shared/src/automation/runner.test.ts packages/shared/src/automation/brief.test.ts packages/shared/src/automation/rules-repository.test.ts 38 pass,0 fail,0 skip
自动化管理界面 bun test --isolate packages/ui/src/components/automation/AutomationRulesView.test.tsx 5 pass,0 fail,0 skip
日报界面 bun test --isolate packages/ui/src/components/today/DailyBriefSection.test.tsx 4 pass,0 fail,0 skip
Electron 主进程接线 bun test --isolate apps/electron/src/main/kernelHost.test.ts 11 pass,0 fail,0 skip
全 workspace 类型检查 bun run typecheck core、i18n、shared、ui、electron 全部退出码 0
中英文案键校验 bun run i18n:check en-US 与 zh-CN 各 1487 个键,0 issues
Secret scan `rg -l --hidden -g '!node_modules/' -g '!docs/' -g '!/*.test.ts' -g '!/*.test.tsx' -g '!bun.lock' 'ghp_[A-Za-z0-9]{20,} github_pat_[A-Za-z0-9_]{20,}
合并差异检查 git diff --check 通过

四条 focused 测试合计 58 pass、0 fail、0 skip。上述均为当前 main 合并态的本地复验。新 head 71e4b24 暂无对应 GitHub Actions run/status;不将本地验证误报为 GitHub Actions 已通过。此前 run 35490794994action_required 状态属于旧 head,也没有启动 jobs。

实际界面截图

以下为 Electron 39.8.9 实际桌面应用中的自动化规则卡片,使用一次性隔离配置和合成证券数据;不是组件测试截图,也不是 #103 的全量真实数据 E2E。

自动化规则卡片:未发现实质变化

关联

本 PR 仅补齐 #103 中“没有实质变化”的运行切片,不关闭整体 Issue;真实数据源、证据链、调度与通知等其余验收项仍需后续完成。

@helsome helsome left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个增量方向可以,且 scope 已明确收窄为 #103 的“no material update”切片,不声称关闭父 Issue;#103 当前也没有有效 assignee,之前的认领者已 /release,因此不存在 ownership 冲突。代码上把 portfolio scope + sourceFetchedAt 冻结到 run,只有 scope 非空且全部证券可完整评估时才给 no_material_update;缺 quote / 缺 prevClose / scope 不可用都落 incomplete,日报只取当日每条规则最新 run,整体语义合理。

当前只差两类合入材料,不要求扩功能:

  1. 把验证报告补成可复现格式:列出实际 Bun 版本、OS,以及你正文里“38 / 9 / 11 项通过、core/UI typecheck、i18n check”的准确命令与 pass/fail/skip 输出。全仓 typecheck 继续如实标明只被 current main 的 experiment-service.ts:534 / runtimeUnusable baseline 阻断即可,不要求在本 PR 修。
  2. 这个 PR 会在 Automation 规则卡片新增用户可见的本地化 outcome 文案(Material changes found / No material changes / Run incomplete),属于明确的可见 UI 状态变化。请补一张实际规则卡片显示 outcome 的截图即可;不要求视频,也不要求做完整 #103 的真实数据 E2E。

GitHub Actions 目前是 action_required(首次贡献者授权状态),不是质量失败;在上述材料补齐前先不 APPROVE/MERGE。

@CC1227871
CC1227871 requested a review from helsome September 20, 2026 07:41
@helsome
helsome dismissed their stale review September 21, 2026 00:11

原 blocker 已失效:当前 PR 描述已补齐 Bun/OS、准确测试命令与 pass/fail/skip/退出码,并附上实际 Electron 规则卡片 outcome 截图。保留的新要求只剩与最新 main 的实际冲突/rebase,不再用旧 REQUEST_CHANGES 阻塞。

@helsome helsome left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

补充材料已满足上一轮 blocker,因此旧 REQUEST_CHANGES 已 dismiss。当前代码按 #103 的独立增量验收:冻结本次 scope/sourceFetchedAt;只有非空 scope 且全部证券完成评估、前收盘价有效且无失败时才标 no_material_update;异常路径明确为 incomplete;真实 JsonFileStore 重载测试覆盖持久化,日报只消费当日每条规则最新的 no-material run。PR 也已补 Bun 1.4.2 / Windows 11、准确命令与 58 pass / 0 fail / 0 skip,以及实际 Electron outcome 截图。

代码层面 APPROVE,但本轮不直接 merge:这是 13-file、跨 core/shared/electron/i18n/ui 且涉及持久化语义的改动,当前 head 的 GitHub Actions 仍是首次 fork 的 action_required,没有实际 CI jobs;同时作者报告里的全仓 typecheck baseline 已被最新 main 修复。这里不把 action_required 当失败,也不要求额外 E2E;只需让当前 head 跑出 basic CI(至少 focused/typecheck/secret scan,或等价的 current-main 合并态验证)后即可合并。

@helsome helsome left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

补充的 current-main 合并态复验已经满足上一轮剩余验证要求:五个受影响 workspace 合计 1480 pass / 0 fail、全 workspace typecheck exit 0、高信号 secret scan 无匹配,并已有实际 Electron outcome 截图。这里不再要求额外 E2E。现有 APPROVE 保持有效;但 GitHub 当前仍计算为 mergeable=false,所以暂不强行合并。请只处理当前合并冲突/不可合并状态,更新到最新 main 后重跑相关 focused + typecheck/basic 验证即可。

@helsome helsome left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

补充本轮 CI 诊断:当前 head 71e4b24adf8498cedafcf2fa00abd3a9e1995dfb 的 run 35595804862 attempt 1 中,Focused tests / Typecheck / Secret scan 均 success,但 Full unit tests (advisory) job 106320182869Run full unit suite 步骤失败。GitHub 连接当前无法读取这个 job 的日志正文/断言,因此不能把它自行归为 baseline 或 flake。

我只做了一次有目的的同-job rerun;attempt 2 的 Full unit tests (advisory) 已 success,同一 SHA 的 workflow 最终 success。这个结果说明失败可重试消失,但不等于根因已查清。现有 APPROVE 保持,代码/作者的 current-main 58/0 focused + 全 workspace typecheck + secret scan 证据也仍有效;本轮暂不合并 #134,避免把未解释的首次 full-suite failure 直接当作无事发生。后续若能取得 attempt 1 的失败断言,或有可核对的相同 baseline 证据,再据此解除这个诊断性保留即可;无需扩大 E2E 或重做已通过的 focused 验证。

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