Files
AirPlan-V2/commands/tst.md
AirPlan 6130478c96 feat: AirPlan V2 — 全专家插件强制路由 + 事件系统规范化
P0-8 扩大: do_mode.py finish_worker 全专家插件强制路由
- GUI→XDB, network→NDB, C/C++→SDB, done→Rvr, blocked/failed→Dbg
- 证据去重: 已有 xdbSessions/ndbSessions/sdbReports/rvrReviewed 则跳过

P1-GAP17: 事件 emit 规范化
- 新增 7 个事件常量 (TASK_ENTERED, TASK_FINISHED, ENGINE_ENTERED 等)
- 全部 emit 调用替换字符串字面量为常量,零残留
- 30 个事件类型常量全部定义且唯一

P1-GAP18: 事件日志原子轮转
- emit 计数器每 128 次检查轮转,避免每次 emit 读文件
- 清除未使用的 _emit_with_completion/_pending_merge_complete
- 原子轮转: tempfile+os.replace 保证不损坏

eng 极端接管: 强制调用全部专家插件 (Dbg/XDB/NDB/SDB/Rvr)
commands/do.md: 更新为全专家插件路由文档

全量测试: 69 通过, 0 失败

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 15:56:44 +08:00

54 lines
1.4 KiB
Markdown
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
description: "AirPlan tst mode - unified test runner for CTest/GoogleTest/pytest/jest/go test/cargo test"
argument-hint: "[run|status]"
allowed-tools: "[Read, Glob, Grep, Bash, Write, Edit]"
---
# /tst
AirTst 是测试运行器。支持多框架统一执行和结构化结果报告。
## 支持的框架
| 框架 | --framework 值 | 语言 |
|------|---------------|------|
| CTest / GoogleTest | `googletest` | C++ |
| pytest | `pytest` | Python |
| jest / vitest | `jest` | TypeScript |
| go test | `go` | Go |
| cargo test | `cargo` | Rust |
## 子命令
### run — 执行测试
```bash
python scripts/airplan.py --mode tst --project . --sub run --task-id T-001 --framework googletest
```
参数:
- `--task-id`:关联任务 ID
- `--framework`:测试框架(见上表)
返回 `{task_id, framework, total, passed, failed}`。emit `test.run` 事件。
制品:`AirPlan/state/airtst/reports/{task_id}-{ts}.json`
### status — 查看测试状态
```bash
python scripts/airplan.py --mode tst --project . --sub status
```
## 集成路径
**Arc 注入的边界测试任务执行**Arc 规划的 `T-TEST-*` 任务执行时调 tst run
```bash
python scripts/airplan.py --mode tst --project . --sub run --task-id T-TEST-001 --framework googletest
```
**Do Worker 完成前自测**Worker finish 前可调 tst 验证:
```bash
python scripts/airplan.py --mode tst --project . --sub run --task-id {tid} --framework {fw}
```