Align Agent mode to strict stepwise generation and execution, add deterministic and safety hardening, and sync deployment/module documentation for Phase 5A.5/5B/5C rollout. - implement strict stepwise execution path and dependency short-circuiting - persist step-level errors/results and stream step_* progress events - add agent plan params patch route and schema/migration support - improve R sanitizer/security checks and step result rendering in workspace - update SSA module guide and deployment change checklist Made-with: Cursor
42 lines
2.3 KiB
Markdown
42 lines
2.3 KiB
Markdown
# 2026-03-11 Agent Phase 5A.5 联调验证清单
|
||
|
||
## 验证目标
|
||
|
||
- 确认 Agent 计划阶段每步都带有 `toolCode + params`,可进入变量编辑态。
|
||
- 确认变量编辑保存接口可用:`PATCH /api/v1/ssa/agent-executions/:executionId/plan-params`。
|
||
- 确认“确认计划”前会自动保存未提交的变量改动。
|
||
- 确认分步执行事件 `step_*` 在右侧工作区可视化正常。
|
||
|
||
## 前置条件
|
||
|
||
- 后端已应用迁移:`20260311_add_ssa_agent_step_seed_fields`。
|
||
- 前端/后端/R 服务均使用本次代码构建并启动。
|
||
- 会话中已上传可用于回归或分组比较的数据集(包含分类与连续变量)。
|
||
|
||
## 联调步骤
|
||
|
||
1. 在 SSA 页面发起 Agent 分析请求(例如“做单因素+多因素回归”)。
|
||
2. 等待右侧出现“分析计划”,检查每个步骤是否可见变量参数编辑控件。
|
||
3. 修改至少一个单变量参数(如 `group_var`)与一个多变量参数(如 `predictors`)。
|
||
4. 点击“保存变量修改”,预期出现“变量参数已保存”提示,无报错。
|
||
5. 刷新页面后回到同一会话,确认步骤参数仍为保存后的值(持久化生效)。
|
||
6. 再次修改参数但不点“保存”,直接点“确认计划,生成代码”。
|
||
7. 预期系统先自动保存参数,再进入代码生成(`coding`),无“参数丢失”。
|
||
8. 点击“确认并执行代码”,观察右侧出现分步状态流转:`coding -> executing -> completed/error/skipped`。
|
||
9. 若有失败步骤,检查错误信息显示在对应步骤卡片,不影响其余步骤状态展示。
|
||
10. 执行完成后,确认结果区 `DynamicReport` 正常渲染且可导出。
|
||
|
||
## 验收标准
|
||
|
||
- 计划步骤参数可编辑、可保存、可恢复。
|
||
- 自动保存逻辑在“确认计划”入口生效。
|
||
- `step_*` 事件驱动的步骤状态、耗时、错误信息显示正确。
|
||
- 未出现左侧对话区替代右侧工作区更新的回归问题。
|
||
|
||
## 常见失败点与排查
|
||
|
||
- 若无变量编辑控件:检查后端 `agent_plan_ready` 是否带 `steps[].params`。
|
||
- 若保存失败 400:检查变量是否存在于 `session.dataSchema.columns`。
|
||
- 若保存失败 409:检查执行状态是否仍为 `plan_pending`。
|
||
- 若步骤状态不更新:检查 SSE 是否收到 `step_*` 事件,前端控制台是否有解析错误。
|