Commit Graph

96 Commits

Author SHA1 Message Date
sinohqb
eb4944a8bd feat(intelligent-eval): terminal-state discipline watchdogs (ADR-0011)
常见故障自愈有上限,超限收敛终态且可见:任务 attempts 上限、会话过期、
planning 双闸、executing 超窗兜底、触发失败计数判死、孤儿 agent 双管、
fire-and-forget 触发;open_session 预算硬闸门、settle 按终态区分、报告
scores 归一化;cron 池遗留面全删。
2026-08-20 14:34:17 +08:00
sinohqb
8959e7ac42 fix(intelligent-eval): respect time-window slot distribution + flat scores
All checks were successful
CI / test (push) Successful in 3m57s
1) 时段分布失效:方案③'立即完成'触发让 worker 一次性创建所有计划会话,
   1h 窗口在几分钟内跑完,time_distribution 时段分布失效。
   - 触发指令明确'仅执行当前到期时段内欠账的会话,绝不创建未来时段会话'
   - worker skill 决策逻辑强化:严格按 current_offset 定位当前时段、只建该时段
     配额内的会话;完成当前时段后标记任务完成,由平台后续时段重新入队触发
2) 综合评分为空:analyst 产出扁平 scores {维度:分},前端 EvalReport 只认
   嵌套 {overall, dimensions} → overall 空。
   - EvalReport 兼容两种结构:维度取 dimensions(嵌套)或整个 scores(扁平),
     综合分取 overall 或维度平均
898 passed, tsc 0, vitest 16
2026-08-18 13:43:14 +08:00
sinohqb
4b66c94969 fix(intelligent-eval): align stat chips so all == sum of states
All checks were successful
CI / test (push) Successful in 3m58s
评估列表:STAT_CHIPS 补 cancelled(已取消 4 条),使 全部18 = 各状态和;
页头 title '智能评估' 统一为 '评估列表'(与菜单一致)。
任务队列:统计条去掉派生的 unresolved(待处理)chip——它与 pending/assigned
重叠重复计数,保留真实四态后 全部8 = 待认领0+执行中1+已完成7+失败0。
tsc 0 错误 vitest 16 passed
2026-08-18 11:03:26 +08:00
sinohqb
2fc3671140 feat(intelligent-eval): eval list default page size 10
All checks were successful
CI / test (push) Successful in 3m56s
评估列表默认每页显示 10 条(原 20),pageSizeOptions 已含 10
2026-08-18 10:53:34 +08:00
sinohqb
60c545ab78 fix(intelligent-eval): task queue all-count + unresolved filter
All checks were successful
CI / test (push) Successful in 4m0s
任务队列全部任务计数把派生的 unresolved 字段也求和了(stats 含
pending/assigned/completed/failed/unresolved),导致显示 9 而实际 8 条。
- 全部任务 = 四态之和(排除 unresolved),与后端 stats 对齐
- 改为一次拉取全部 + 前端过滤(unresolved 是 pending+assigned 并集,
  后端 status 单选无法表达);筛选/分页为前端状态,筛选变化重置到第 1 页
tsc 0 错误 vitest 16 passed
2026-08-18 10:48:13 +08:00
sinohqb
57951f7940 fix(intelligent-eval): task queue pagination + column widths align with eval list
All checks were successful
CI / test (push) Successful in 3m58s
任务队列页对齐评估列表:
- 分页:始终显示(pageSize 10 + showSizeChanger + showTotal),此前仅在
  >10 条时显示导致 t480(8 条)无分页器
- 列宽重新分配:评估列 230→300(长名称不截断)、原因列固定 240(ellipsis)、
  入队/完成时间 170、队列状态 100、优先级 80
- 字体格式对齐评估列表:去掉 size="middle" 改用默认(与评估列表一致)
tsc 0 错误 vitest 16 passed
2026-08-18 10:35:51 +08:00
sinohqb
47804f2df3 refactor(ui): extract SectionHeader + drop deprecated CronPoolMonitor (audit P2)
All checks were successful
CI / test (push) Successful in 3m57s
UI/UX 盘点 P2 + 清理:
- 新增 SectionHeader 共享组件,替换 DecisionProcess/ConfigSnapshots(主列表+快照
  对比)/EvalReport 自管 header 的重复(返回+标题+右侧操作区)
- 删除已 DEPRECATED 的 CronPoolMonitor 页面及其测试(导航早已移除,监控职责
  已由 TaskQueueMonitor 承担)
tsc 0 错误 vitest 16 passed(CronPoolMonitor 3 测试随之删除)
2026-08-17 23:51:40 +08:00
sinohqb
fa5e3b8d5d refactor(ui): consolidate state maps + colors to tokens (audit P1)
UI/UX 盘点 P1 一致性修复:
- 收敛重复状态映射:ExplorationSection 复用 SESSION_STATUS、TaskQueueMonitor
  复用 EVAL_STATUS(消除 blue/green 与 processing/success 颜色漂移)、
  Campaigns 复用 SEVERITY_META(均来自 intelligent_eval/status.ts)
- 硬编码颜色走 token:Reports 通过率用 passRateColor、通过/失败/delta 用
  statusColors;IntelligentEvals/TaskQueueMonitor/EvalReport/PeriodComparison
  的 #52c41a/#ff4d4f 用 statusColors.completed/failed;RunList/RuleOverview
  的 #faad14 用 colors.warning;Home 的 #1677ff 用 colors.primary
tsc 0 错误 vitest 19 passed
2026-08-17 23:42:13 +08:00
sinohqb
3626ab288b fix(intelligent-eval): P0 UI/UX refresh defects (audit)
UI/UX 全面盘点(.scratch/ui-ux-audit.md)P0 功能缺陷修复:
- DecisionProcess/ConfigSnapshots:useState(()=>load()) 一次性加载改为
  useEffect 依赖 evalId(切评估重拉)+ 头部补 ReloadOutlined 刷新按钮
- useRunSession:自写 setInterval(3000) 轮询改 usePolling(pauseWhenHidden
  默认开启:后台标签页暂停、回前台立即刷新);selectedIdRef 守卫保留防串;
  删除 pollRef/clearPolling
- useFiles:接入 useOnTabActive('/files'),keep-alive 跳回自动刷新
tsc 0 错误 vitest 19 passed
2026-08-17 22:59:23 +08:00
sinohqb
00ad929d68 feat(intelligent-eval): v4.2 UI — stat bar + single-line table + unified detail drawer
All checks were successful
CI / test (push) Successful in 3m58s
评估列表页(v4.2):
- 顶部状态统计条(stat-chip 点击筛选,后端列表接口新增 stats 状态分布 +
  status 筛选参数)
- 单行表格(名称/评测对象 ellipsis 省略)+ 会话进度迷你进度条 +
  最后一列醒目查看按钮 + 整行可点击
- 详情/报告合一单层抽屉(1000px,Tabs:概览/决策过程/配置历史/报告),
  审批/取消在抽屉头部;移除独立详情页 /intelligent-evals/detail 与
  intelligentEvalNav store

任务队列页:
- 与列表页统一 stat-chip 统计条 + 单行表格(评估状态小标、失败原因 tooltip)

清理:删除 IntelligentEvalDetail.tsx / intelligentEvalNav.ts;App.tsx 移除
detail 路由。任务队列保持独立菜单页。tsc 0 错误 vitest 19 passed 895 passed
2026-08-17 20:03:55 +08:00
sinohqb
a69fa8a797 refactor(intelligent-eval): split list page into dedicated pages
All checks were successful
CI / test (push) Successful in 4m7s
评估列表页此前用 Drawer 嵌套承载详情/报告/任务队列/新建,功能页面过多。
按 keep-alive 多页模式拆为独立页面(静态路由 + intelligentEvalNav store 传递选中):
- 评估列表 (/intelligent-evals):只留列表 + 新建;详情/报告/任务队列改为导航
- 任务队列 (/intelligent-evals/tasks):TaskQueueMonitor 独立页,二级菜单项
- 评估详情 (/intelligent-evals/detail):新独立页,页内 Tabs 承载概览/决策过程/
  配置历史/报告(completed 才显示报告 tab),取代 Drawer 嵌套;审批/打回/取消
  提到页面头部统一管理
- EvalDetail 拆为纯展示的 EvalOverview;DecisionProcess/ConfigSnapshots/EvalReport
  的 onBack 改可选(tab 环境不显示返回按钮)
- index.css 加 intelligent-detail-tabs 高度链(绕开 Ant CSS-in-JS 高度覆盖)
tsc 0 错误, vitest 19 passed
2026-08-17 16:39:53 +08:00
sinohqb
2dd023fdd9 docs(intelligent-eval): align domain language with trigger-driven execution (ADR-0009)
All checks were successful
CI / test (push) Successful in 4m2s
方案③落地后,智能评估执行机制从'常驻 cron 每分钟自唤醒'改为'平台每 60s
扫描入队 + 按需触发无状态 headless agent'(触发式执行)。对齐领域语言:
- CONTEXT.md:Cron 池/工作单元(Worker)标 deprecated;新增触发式执行词条;
  修正时间窗口(cron 自唤醒→平台扫描时段到期)、任务队列(消费端)、决策日志
- ADR-0009 新增:记录触发式执行取代 cron 池的决策(原因:cron 需外部 channel,
  OpenClaw webchat 非 channel 账号无法 delivery);ADR-0007 标 superseded
- 代码标 deprecated:cron_pool / fault_tolerance / openclaw_cron_pool 路由 /
  CronPoolMonitor 页(导航入口已从 App.tsx 移除,监控由 TaskQueueMonitor 承担)
895 passed, vitest 19 passed
2026-08-17 16:16:12 +08:00
sinohqb
cc2ac8da89 feat(intelligent-eval): paginate the eval list
All checks were successful
CI / test (push) Successful in 4m5s
GET /api/intelligent-evals 支持 page/page_size(默认不传仍返回全部,向后兼容):
repository 加 count/list_page,lifecycle 加 list_evals_page,router 返回 total。
前端服务端分页:useIntelligentEvalRead 接 page/pageSize,list 存 total,
IntelligentEvals 表格 showSizeChanger + 页码切换重新加载;5s 轮询保持当前页。
测试:+3 后端分页 + hook 页码透传/总数断言,895 passed,vitest 19 passed
2026-08-17 14:09:17 +08:00
sinohqb
b4f9c887f4 feat(intelligent-eval): task queue monitor (方案③可视化)
All checks were successful
CI / test (push) Successful in 4m1s
方案③的定时触发(scan loop 每 60s 入队 + 触发 worker)此前只有 Worker
消费端 API,无可查看的列表。新增:
- GET /api/intelligent-evals/tasks:任务明细(含评估名/状态)+ 状态分布统计
  (注册在 /{eval_id} 之前避免被捕获为 eval_id="tasks")
- 前端 TaskQueueMonitor 组件 + 智能评估页任务队列入口:5s 轮询
  (usePolling),状态卡 + 状态筛选 + 明细表
测试:+3(列表/筛选/不被 {eval_id} 遮蔽),892 passed,tsc 通过
2026-08-17 13:57:00 +08:00
sinohqb
6309b6abca fix(frontend): report overall NaN + header card styling
All checks were successful
CI / test (push) Successful in 4m1s
- NaN root cause: report.scores is nested { overall, dimensions: {...} };
  the old code treated every value as a number, so Number({object}) → NaN.
  Now: dimScores from scores.dimensions, overall prefers scores.overall.
- Header summary cards restyled: icon + colored big number + responsive
  (xs=12 md=6), colored score (>0.8 green / 0.6-0.8 amber / else red).
2026-08-17 02:01:45 +08:00
sinohqb
0c1e4578c9 refactor(frontend): unify polling via usePolling + visibility pause (S6)
All checks were successful
CI / test (push) Successful in 3m57s
- usePolling gains a pauseWhenHidden option (default true): the timer
  pauses while the document is hidden (background tab / minimised) and
  resumes with an immediate reload on returning to visible. Callers keep
  owning their initial fetch, so no duplicate first request.
- CronPoolMonitor now delegates its 5s poll to the shared usePolling hook
  (initial load stays in its own useEffect); removes the bespoke
  setInterval + manual visibility gap.
- CronPoolMonitor.test: visibility guard now passes (3/3), removing the
  previous it.fails. Frontend suite: 18/18; tsc clean; backend 878.

Resolves scan §6.3.
2026-08-14 15:57:07 +08:00
sinohqb
ee9cc3305e fix(release): commit package-lock.json version sync (1.1.1)
Some checks failed
CI / test (push) Failing after 44m29s
bump commit 444e9d7 missed package-lock.json; CI version-consistency
check (sync_version.py --check) failed with OUT_OF_SYNC. This commit
brings the lockfile in line so CI/CD can pass.
2026-08-13 14:49:34 +08:00
sinohqb
444e9d74e8 chore(release): bump version to 1.1.1
Some checks failed
CI / test (push) Failing after 1m13s
2026-08-13 14:25:38 +08:00
sinohqb
b5bcd13fa0 test(intelligent-eval): add #6 frontend + router contract + immutability + alert-autoscale link tests
Some checks failed
CI / test (push) Failing after 4m34s
T2 frontend CronPoolMonitor: polls every 5s, unmount clears interval,
   plus it.fails guard for missing visibilitychange listener (S6).
T3 router ORM contract: heartbeat updates fields + 404, decision-logs
   POST persists + 404, GET lists inserted (guards S2 — must continue to
   pass after router handlers move into a service in P3).
T8 decision-log immutability: append-only on context change passes;
   dedupe of identical (decision_type, context) is xfail (real gap).
T7 alert→auto-scale: task_backlog alert recorded on first call (passes);
   check_alerts never invokes auto_scale is xfail (real gap, §6.4).

All real gaps are logged in .scratch/v111-architecture-scan.md §6.
2026-08-13 04:03:17 +08:00
sinohqb
fed52f3920 fix(deploy): resolve cron pool initialization issues
Some checks failed
CI / test (push) Failing after 32s
- Add Cron Pool Monitor entry to sidebar menu
- Install Docker CE CLI from Aliyun mirror for container exec
- Mount Docker socket for managing openclaw-eval container
- Fix OpenClaw CLI commands (cron add/rm/list instead of automations)
- Add gateway token auth for CLI access
2026-08-12 13:40:18 +08:00
sinohqb
617cc3909d chore: clean up release notes and update lockfile
- Remove old release-notes-v1.1.md (renamed to v1.1-legacy.md)
- Update package-lock.json after version bump to 1.1.0
2026-08-12 11:12:29 +08:00
sinohqb
15699e0dd0 chore(release): bump version to 1.1.0
Add intelligent evaluation cron pool architecture:
- Cron pool management (5-20 workers)
- Task queue with priority-based scheduling
- Worker skill with autonomous decision logic
- Config snapshot management and comparison
- Decision process tracking and visualization
- Monitoring and alerting system
- Fault tolerance and recovery mechanisms
- Frontend UI for config history, decision process, and cron pool monitoring

All 853 tests passing.
2026-08-12 11:09:38 +08:00
sinohqb
244feae505 feat(intelligent-eval): add cron pool monitoring UI (ticket 10)
- Add openclawCronPoolApi with all cron pool API calls
- Add CronPoolMonitor page with pool status, metrics, and alerts
- Implement real-time refresh (5 second polling)
- Implement manual scaling with target size input
- Add alert history table with resolve functionality
- Add route /cron-pool for cron pool monitoring page
- Pass TypeScript type checking

All 853 tests passing.
2026-08-12 11:05:51 +08:00
sinohqb
ee639afb0d feat(intelligent-eval): add decision process UI (ticket 09)
- Add list_decision_logs API endpoint
- Add DecisionProcess component with timeline, list, filter, and export
- Add decision log API calls to api.ts
- Add "决策过程" button in EvalDetail to access decision history
- Implement decision log export to JSON
- Pass TypeScript type checking

All 853 tests passing.
2026-08-12 10:59:51 +08:00
sinohqb
4b8afa892b feat(intelligent-eval): add config snapshots UI (ticket 08)
- Add ConfigSnapshots component with list, detail, compare, and export features
- Add config snapshot API calls to api.ts
- Add "配置历史" button in EvalDetail to access config history
- Implement snapshot comparison with diff view
- Implement snapshot export to JSON
- Pass TypeScript type checking

All 853 tests passing.
2026-08-12 10:50:11 +08:00
sinohqb
941df4c8c7 release: normalize project version to v1.0.0 2026-08-11 14:07:05 +08:00
sinohqb
1782b245bf refactor(architecture): deepen campaign runtime modules 2026-08-11 13:18:48 +08:00
sinohqb
864ae2b7fe fix(review): address release correctness findings 2026-08-09 03:20:40 +08:00
sinohqb
4a0709b456 fix(frontend): synchronize production lockfile 2026-08-09 01:52:21 +08:00
sinohqb
62485684ca fix(architecture): enforce lifecycle consistency 2026-08-07 10:59:27 +08:00
sinohqb
c896ab3f71 refactor(architecture): deepen evaluation lifecycle and read model 2026-08-07 03:11:37 +08:00
sinohqb
804880f1e3 fix(intelligent-eval): add top padding in drawer bodies
抽屉 body padding 为 0,顶栏按钮与提示贴住头部分割线;
详情/报告根容器补 16px 顶部内边距。
2026-08-06 01:52:46 +08:00
sinohqb
01f451c155 feat(intelligent-eval): align detail/report drawer layouts with other modules
详情抽屉改两列布局(左静态上下文/右动态流程),会话进度加 Progress;
报告抽屉顶部加统计概览行与维度得分柱状图,移除总结卡内重复的分数展示。
2026-08-06 01:03:28 +08:00
sinohqb
22cc437e2d feat(intelligent-eval): adjust drawer top-bar layout
详情页移除返回列表按钮(抽屉自带关闭),操作按钮右对齐;
报告页保留返回详情,导出 Markdown 按钮右对齐。
2026-08-06 00:37:02 +08:00
sinohqb
1d2c37277c feat(intelligent-eval): open detail/report in right-side drawer
列表常驻,详情与报告改为右侧抽屉弹出,减少页面层级嵌套。
2026-08-06 00:29:52 +08:00
sinohqb
935f0a1f57 refactor(ui): open intelligent eval via action-column buttons
Replace the name link and row-click with explicit detail/report
buttons, matching the static-eval table pages. Report button only
shows for completed evals; list pagination now follows the 20-row
threshold.
2026-08-05 21:00:19 +08:00
sinohqb
11b15908c7 refactor(ui): align Campaigns page with consistency baseline (ui-consistency ticket 08)
Create-activity form switched to FormDrawer (width 920, footer submit),
20-row pagination threshold on campaign and sub-run tables. Report
drawer stays a plain Drawer (read-only with export action). Timeline,
exploration, and analysis interactions unchanged.
2026-08-05 20:27:54 +08:00
sinohqb
5077f088b1 refactor(ui): align Reports page shell with consistency baseline (ui-consistency ticket 07)
PageWrapper inline fullHeight with an inner flex column to keep the
selection bar / content split, and 20-row pagination threshold on the
compare-case table. Report selection, charts, and compare logic
unchanged.
2026-08-05 20:26:43 +08:00
sinohqb
b9011aad80 refactor(ui): align Runs page shell with consistency baseline (ui-consistency ticket 06)
Replace custom header with PageWrapper inline fullHeight and add
Popconfirm to the stop action. The nav-only-tabs content-split hack is
preserved; WebSocket session, rerun, and list logic untouched.
2026-08-05 20:25:17 +08:00
sinohqb
1588972a8e refactor(ui): migrate Scenarios page to consistency baseline (ui-consistency ticket 05)
FormDrawer with footer submit at width 720 (keeps Monaco room),
submitting guard, 20-row conditional pagination, Empty locale,
unified delete Popconfirm wording. Preview/template Modals kept as
read-only surfaces.
2026-08-05 20:23:46 +08:00
sinohqb
f1316578fe refactor(ui): migrate ModelConfigs page to consistency baseline (ui-consistency ticket 04)
FormDrawer with footer submit and submitting guard, 20-row conditional
pagination, Empty locale, unified delete Popconfirm wording. Capability
and modality validation logic unchanged.
2026-08-05 20:22:14 +08:00
sinohqb
2e78c4befd refactor(ui): align Files page with consistency baseline (ui-consistency ticket 03)
Delete confirmations already existed (d7514f4), so no behavior fix was
needed. Switch empty states to antd Empty (table + category tree) and
apply the 20-row pagination standard.
2026-08-05 15:40:54 +08:00
sinohqb
15d0d127ae refactor(ui): migrate Targets page to consistency baseline (ui-consistency ticket 02)
FormDrawer with footer submit, submitting guard, 20-row conditional
pagination, Empty locale, unified delete Popconfirm wording.
2026-08-05 15:38:37 +08:00
sinohqb
d4c254e121 refactor(ui): baseline FormDrawer component and IntelligentEvals dogfood (ui-consistency ticket 01)
Extract the standard form drawer (width 640, footer actions, destroyOnClose)
as FormDrawer; reuse existing usePolling hook. IntelligentEvals becomes the
first consumer — create drawer and both 5s pollings switched with zero
behaviour change. Includes ui-consistency spec, tickets, and ADR-0005.
2026-08-05 15:34:31 +08:00
sinohqb
6cc2efafb6 feat(frontend): detail auto-refresh, session list, pinned AI-assistant tab
Some checks failed
CI / test (push) Failing after 40s
- Detail page silently polls every 5s while planning/executing/pending_approval
- Detail page shows per-session progress (persona/status/goal/turns), polled while executing
- /openclaw tab pinned by default like the dashboard (tabStore now .tsx)
2026-08-05 14:01:26 +08:00
sinohqb
9cdbc41808 docs(intelligent-eval): commit v1.0 spec, tickets, and post-v1.0 improvements
All 8 tickets' acceptance criteria checked off (incl. the real OpenClaw
E2E verified on t480). Trivial import-sort fix from ruff included.
2026-08-05 14:01:24 +08:00
sinohqb
cbee749da2 feat(intelligent-eval): frontend list/detail/report pages (tickets 05-07)
Some checks failed
CI / test (push) Failing after 1m31s
List page with create drawer, detail panel with plan approval/rejection,
and structured report view with severity-sorted findings and session
chat drill-down. Views switch inside the /intelligent-evals keep-alive tab.
2026-08-05 03:49:13 +08:00
sinohqb
da6ccc265d feat(frontend): restructure admin menu into two-level groups and add intelligent-eval entry
Some checks failed
CI / test (push) Failing after 50s
Reorganize the sidebar into top-level items plus four groups (静态评估 / 智能评估 /
配置中心 / 系统), add the /intelligent-evals route with a placeholder page, and tune
the expanded-submenu background so nested groups sit harmoniously on the dark sider.
2026-08-05 03:27:48 +08:00
sinohqb
f93d2f224f fix(frontend): auto-fetch report data when campaignId changes
Some checks failed
CI / test (push) Failing after 11s
useCampaignReport hook 缺少 useEffect 自动触发数据获取,导致打开报告抽屉时
显示空白。添加 useEffect 监听 campaignId 变化,自动调用 refetch。

- 新增 useEffect 在 campaignId 变化时自动获取数据
2026-08-04 13:39:41 +08:00
sinohqb
cbfdf86b36 refactor(frontend): extract useCampaignReport hook from Campaigns.tsx
将活动报告抽屉的数据获取逻辑从 Campaigns.tsx 抽离到 useCampaignReport hook。
消除 5 个独立状态变量(report/reportRuns/reportTimeline/analysis/comparison)
和 fetchReport 函数的 25 行样板代码。hook 封装 5 个并行 API 调用和状态管理,
组件只负责渲染和交互。

- 新增 useCampaignReport(campaignId) hook
- 返回 {report, runs, timeline, analysis, comparison, loading, refetch, setAnalysis, setComparison}
- Campaigns.tsx 从 1122 行缩减状态管理复杂度
- TypeScript 类型检查通过,后端测试全绿
2026-08-04 11:45:15 +08:00