bpmax-cli 0.2.1-beta.11 → 0.2.1-beta.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -33,6 +33,26 @@ bpmax-cli init --agent <agent> --channel feishu --url "<BPMAX_URL>" --name local
|
|
|
33
33
|
- 找到匹配业务 skill 后,先复制 `next_commands.bbs_list` 里的 `--config-dir` 前缀运行 `bpmax-cli --config-dir <config_dir> bbs ensure <skill-key> --agent <agent> --profile <profile> --format json`,再按该业务 skill 的规则执行。
|
|
34
34
|
- 只有没有匹配 BBS,或 BBS 不覆盖当前需求时,才回落到通用 `bpmax-flow`、`bpmax-project` 或 `bpmax-api` 路径。
|
|
35
35
|
|
|
36
|
+
## Issue 提报
|
|
37
|
+
|
|
38
|
+
用户要求“提 issue”、“创建 GitLab issue”、“报 bug 到 bpmax-cli”或需要把当前问题沉淀到 bpmax-cli 仓库时,使用 `bpmax-cli issue create` 或语义别名 `bpmax-cli issue report`。
|
|
39
|
+
|
|
40
|
+
推荐流程:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
bpmax-cli issue create --title "<标题>" --description-file <file.md> --label bug --dry-run --format json
|
|
44
|
+
bpmax-cli issue create --title "<标题>" --description-file <file.md> --label bug --format json
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
规则:
|
|
48
|
+
|
|
49
|
+
- 默认 GitLab 地址是 `https://gitlab.yitaiyitai.com`,默认项目是 `bpmax/bpmax-cli`;跨项目时显式加 `--project <group/project>`。
|
|
50
|
+
- 复杂描述先写到临时 markdown 文件,再用 `--description-file <file>`,不要把长日志或多行正文塞进命令行参数。
|
|
51
|
+
- 涉及 assignee 时用 `--assignee-id <id>`,可重复或传逗号分隔;涉及保密问题时加 `--confidential`。
|
|
52
|
+
- 默认先跑 `--dry-run --format json` 核对标题、正文、标签、项目和 assignee;确认后再去掉 `--dry-run` 实际提交。
|
|
53
|
+
- 需要指定凭据来源时用 `--token-env <ENV_NAME>`;不要在命令行、skill、memory、issue 正文或日志里写入 token 原文。
|
|
54
|
+
- 创建成功后,最终回复必须包含 CLI 返回的 issue URL;`pretty` 输出会直接打印 URL,`json` 输出读取 `issue.web_url`。
|
|
55
|
+
|
|
36
56
|
## 路由规则
|
|
37
57
|
|
|
38
58
|
- 环境配置、全局参数、命令发现、原始 API 降级:先读 `../bpmax-shared/SKILL.md`
|
|
@@ -49,6 +69,7 @@ bpmax-cli init --agent <agent> --channel feishu --url "<BPMAX_URL>" --name local
|
|
|
49
69
|
- BPMAX Business Skills 查询、同步、安装、更新、卸载:读 `../bpmax-business-skill/SKILL.md`
|
|
50
70
|
- AI 任务方案、任务书、任务拆解、subagent 分工、实施任务表、进度 CSV:读 `../bpmax-ai-taskbook/SKILL.md`
|
|
51
71
|
- 审批矩阵、角色矩阵、矩阵规则记录、`matrix_owner`、`cc_matrix`、规则 seed、审批人映射:读 `../bpmax-approval-matrix/SKILL.md`
|
|
72
|
+
- bpmax-cli 自身问题提报、GitLab issue 创建:留在本 skill 的 “Issue 提报” 小节,使用 `bpmax-cli issue create/report`
|
|
52
73
|
|
|
53
74
|
## 规则
|
|
54
75
|
|
|
@@ -161,7 +161,8 @@ bpmax-cli e2e cache refresh --flow-id <flow_id> --profile <profile> --format jso
|
|
|
161
161
|
- `unresolved.P0` 和 `unresolved.P1` 必须都是 `0`。
|
|
162
162
|
- `cases.csv` 字段必须固定为:`case_id,priority,type,title,preconditions,config_basis,prep_data,steps,expected_result,test_data,roles,evidence_required,tags,status,updated_at`。
|
|
163
163
|
- `config_basis` 必须指向真实存在的配置或能力依据,并说明覆盖原因。配置仓库使用 `think_*`、`.ai_test/`、`.codex/skills/`;`bpmax-cli` 包内能力可引用 `skills/`。
|
|
164
|
-
- 每条正式 E2E 用例的 `prep_data` 必须包含执行前置证据:`precondition_check=`、`browser_tool=`、`live_draft=`、`state_file=` 或 `report_run
|
|
164
|
+
- 每条正式 E2E 用例的 `prep_data` 必须包含执行前置证据:`precondition_check=`、`browser_tool=`、`live_draft=`、`state_file=` 或 `report_run=`,并必须声明 `resume_policy=full_rerun|checkpoint|evidence_only`。默认重新运行使用 `resume_policy=full_rerun`;没有 `precondition_check` 记录时,只能进入准备阶段,不能写正式执行结论。
|
|
165
|
+
- `state_file=` / `report_run=` 不得写死历史 run 或历史日期。正式用例模板应使用 `<run_id>` / `<date>` 占位,执行时再生成本轮独立状态文件和报告目录;历史状态、历史报告、历史截图只能作为“历史对照”,不能作为本轮 pass evidence。
|
|
165
166
|
- 用例内容必须可读,`title`、`preconditions`、`config_basis`、`prep_data`、`steps`、`expected_result`、`test_data` 不得出现乱码、异常编码片段、`???`、`xxx`、`占位`、`待补`、`暂无`、`略` 这类空洞内容;`steps` 必须是可执行步骤,不得是一句泛泛备注。
|
|
166
167
|
- 负向、边界、异常、错误提示、扫码错误 SN 等用例必须在 `expected_result`、`steps` 或 `evidence_required` 中写明 `expected_error_text` 或 `error_capture_required`,并要求真实错误提示截图。没拿到提示文案时,结论写“提示文案未取到”,不要直接判业务失败。
|
|
167
168
|
- 涉及人工介入、手工补救、续跑、`dirty_resumed` 的用例,必须在 `prep_data` 或步骤中声明 `resume_policy=full_rerun|checkpoint|evidence_only`,并说明是从头重跑、检查点重跑还是仅补证据;局部续跑只能给局部结论。
|
|
@@ -195,10 +196,14 @@ bpmax-cli test-suite lint-report --root .ai_test/report
|
|
|
195
196
|
|
|
196
197
|
### 报告完整性门禁
|
|
197
198
|
- 单次执行报告必须位于 `.ai_test/report/<YYYYMMDD-NNN>/`,截图必须位于同一 run 的 `screenshots/` 下;`.codex/docs/` 只放复盘、长周期总结或交付版文档,并引用 `run_id` 和原始报告路径。
|
|
198
|
-
- 场景报告必须写 `planned_cases:`、`executed_cases:`、`precondition_check:`、`state_file:`、`browser_tool:`。`planned_cases` 与 `executed_cases` 必须逐条对账;有未执行用例时只能写阶段/局部结论,不能写完整通过。
|
|
199
|
+
- 场景报告必须写 `planned_cases:`、`executed_cases:`、`precondition_check:`、`state_file:`、`report_run:`、`browser_tool:`、`rerun_policy:`。`planned_cases` 与 `executed_cases` 必须逐条对账;有未执行用例时只能写阶段/局部结论,不能写完整通过。
|
|
199
200
|
- 报告出现 `not run`、`未执行`、`跳过` 时,`result:` 必须降级为 `partial`、`stage`、`blocked` 或明确“阶段/局部/不完整”。没有用户确认缩小范围时,不得把跳过用例合并进完整结论。
|
|
200
201
|
- 没有合规浏览器工具或页面证据时,必须使用浏览器阻塞模板:`browser_status: blocked`,并写“页面结论停止”;不得用 API/readback 证据冒充页面验证。
|
|
201
202
|
- 报告里写“页面通过 / 浏览器回归完成 / 真实页面已验证 / 完整链路通过”时,必须同时有 `browser_tool:` 和本 run 的本地截图证据。
|
|
203
|
+
- 用户明确要求“重新运行测试用例”“全量重跑”“重新回归”时,报告必须写 `rerun_policy: full_rerun`,并逐 case 重新执行。禁止直接查找旧结果、旧报告、旧状态文件或旧截图来填充本轮 `executed_cases`、pass 结论或页面证据。
|
|
204
|
+
- `full_rerun` 报告的 `run_id:` 必须等于当前 `.ai_test/report/<YYYYMMDD-NNN>/` 目录名;`state_file:`、`precondition_check:`、`report_run:` 必须指向本轮 run 或本轮日期;截图文件必须位于本轮 `screenshots/` 且修改时间落在本轮 `started_at` / `finished_at` 时间窗内。
|
|
205
|
+
- `checkpoint` / `evidence_only` 只能给局部或对照结论。若使用历史报告或历史截图,必须标成历史对照,不得声明“完整重新运行通过”。
|
|
206
|
+
- 每个 `executed_cases` 中的通过用例,都必须在结果表、截图 alt/path、项目 ID、step ID 或本轮证据路径中能定位到当前 case;缺少本轮 case evidence 时,不能写 pass。
|
|
202
207
|
|
|
203
208
|
### 测试资产与真实页面回归边界
|
|
204
209
|
- 更新 `.ai_test/suite_draft`、通过 lint、完成 review、promote 到 `.ai_test/suite`,只能证明“测试资产已更新”,不等于已经完成真实页面回归。
|
|
@@ -89,7 +89,7 @@ case_id,priority,type,title,preconditions,config_basis,prep_data,steps,expected_
|
|
|
89
89
|
|
|
90
90
|
```csv
|
|
91
91
|
case_id,priority,type,title,preconditions,config_basis,prep_data,steps,expected_result,test_data,roles,evidence_required,tags,status,updated_at
|
|
92
|
-
C001,P0,positive,正常客户换货主链路,有可用旧机SN和新机库存,"think_flow/flow_type'flow451422190___key'___status'1___is_del'0/flow 校验主流程节点和审批链; think_data_set/.../data_set 覆盖库存联动落库依据","账号=store_staff,dealer_owner;入口=https://yaditest.yitaiyitai.com/w:store_mgr/project?flow_type=flow451422190;样本=新建换货样本;准备操作=确认旧机SN和新机库存可用并打开创建入口;预期=旧机SN和新机库存可被选择且审批人可达;主数据=旧机SN和新机库存;precondition_check=.codex/tmp/e2e_states/customer-exchange.json;browser_tool=Chrome DevTools;live_draft=live;state_file=.codex/tmp/e2e_states/customer-exchange.json;report_run=.ai_test/report
|
|
92
|
+
C001,P0,positive,正常客户换货主链路,有可用旧机SN和新机库存,"think_flow/flow_type'flow451422190___key'___status'1___is_del'0/flow 校验主流程节点和审批链; think_data_set/.../data_set 覆盖库存联动落库依据","账号=store_staff,dealer_owner;入口=https://yaditest.yitaiyitai.com/w:store_mgr/project?flow_type=flow451422190;样本=新建换货样本;准备操作=确认旧机SN和新机库存可用并打开创建入口;预期=旧机SN和新机库存可被选择且审批人可达;主数据=旧机SN和新机库存;precondition_check=.codex/tmp/e2e_states/customer-exchange.json;browser_tool=Chrome DevTools;live_draft=live;state_file=.codex/tmp/e2e_states/customer-exchange.json;report_run=.ai_test/report/<run_id>;resume_policy=full_rerun;login_profile=store_staff,dealer_owner;mock_user=store_staff后切dealer_owner;unmock_done=测试结束恢复管理员",发起换货 > 填写旧机 > 填写新机 > 提交 > 审批通过,旧机入库,新机出库,项目终态正确,"业务场景=客户换货补录;业务逻辑=旧机SN应回收入库且新机库存应出库并进入审批链;样本数据=旧机SN为已售可回收库存,新机SN为当前门店可用库存;合理性=符合客户退换货业务中一退一发和经销商负责人审批逻辑",store_staff,dealer_owner,screenshot+project_detail+每个角色独立截图,"core,inventory,approval",active,2026-06-18
|
|
93
93
|
```
|
|
94
94
|
|
|
95
95
|
## latest gate
|
|
@@ -306,12 +306,16 @@ run_id: 20260618-001
|
|
|
306
306
|
scenario_id: customer-exchange-main-flow
|
|
307
307
|
source_suite: .ai_test/suite/customer-exchange-main-flow
|
|
308
308
|
result: pass
|
|
309
|
+
rerun_policy: full_rerun
|
|
309
310
|
tested_at: 2026-06-18
|
|
311
|
+
started_at: 2026-06-18T10:00:00+08:00
|
|
312
|
+
finished_at: 2026-06-18T11:00:00+08:00
|
|
310
313
|
|
|
311
314
|
planned_cases: C001,C002,C003
|
|
312
315
|
executed_cases: C001,C002,C003
|
|
313
|
-
precondition_check: .codex/tmp/e2e_states/customer-exchange.json
|
|
314
|
-
state_file: .codex/tmp/e2e_states/customer-exchange.json
|
|
316
|
+
precondition_check: .codex/tmp/e2e_states/customer-exchange-20260618.json
|
|
317
|
+
state_file: .codex/tmp/e2e_states/customer-exchange-20260618.json
|
|
318
|
+
report_run: .ai_test/report/20260618-001
|
|
315
319
|
browser_tool: Chrome DevTools
|
|
316
320
|
|
|
317
321
|
## 1. 测试范围
|
|
@@ -348,8 +352,13 @@ bpmax-cli test-suite lint-report --root .ai_test/report
|
|
|
348
352
|
|
|
349
353
|
报告 lint 会硬检查:
|
|
350
354
|
- `planned_cases:` 和 `executed_cases:` 必须存在且逐条对账;planned 中未出现在 executed 的用例必须有 blocked/not run 原因,报告结论降级为阶段/局部。
|
|
351
|
-
- `
|
|
355
|
+
- `run_id:` 必须等于当前 `.ai_test/report/<YYYYMMDD-NNN>/` 目录名。
|
|
356
|
+
- `precondition_check:`、`state_file:`、`report_run:`、`browser_tool:`、`rerun_policy:` 必须存在。
|
|
357
|
+
- `rerun_policy: full_rerun` 表示本轮重新运行,不能直接引用旧结果、旧报告、旧状态文件或旧截图填充本轮 `executed_cases` 和 pass 结论。
|
|
358
|
+
- `full_rerun` 下 `state_file:`、`precondition_check:`、`report_run:` 必须指向本轮 run 或本轮日期;截图必须位于本轮 `screenshots/`,且文件修改时间落在 `started_at:` / `finished_at:` 时间窗内。没有时间窗时按 run 日期校验。
|
|
359
|
+
- 每个 `executed_cases` 里的通过用例都必须有本轮 case evidence:结果表 evidence、截图 alt/path、项目 ID、step ID 或本轮证据路径需能定位该 case。
|
|
352
360
|
- 页面/浏览器结论(页面通过、浏览器回归通过、完整链路通过)必须有 `browser_tool` 证据和截图;接口/回读证据不能冒充页面验证。
|
|
353
361
|
- 出现 `not run` 但 `result: pass` 的报告必须降级为 `partial` 或 `stage`。
|
|
354
362
|
- 浏览器 blocked 报告必须使用 `browser_status: blocked` 模板并停止页面结论。
|
|
363
|
+
- `checkpoint` / `evidence_only` 可以引用历史证据作为对照,但只能写局部/对照结论,不能写完整重新运行通过。
|
|
355
364
|
- 报告中的乱码/空洞步骤会通过用例内容 lint 拦截。
|