Add repo-memory CLI test docs
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
# Case: `events-resolves-entry-by-repo-kind-key`
|
||||
|
||||
## 用例意义
|
||||
|
||||
验证 `events` 在没有 `--id` 时,仍可通过 `repo + kind + key` 解析目标 entry。
|
||||
|
||||
## 前置条件
|
||||
|
||||
- 空数据库已完成 `init`
|
||||
- `TMPDIR/repo` 下已存在 `term:AITask` 一条 entry
|
||||
|
||||
## 输入
|
||||
|
||||
```bash
|
||||
repo-memory events --db TMPDIR/repo-memory.db --repo TMPDIR/repo --kind term --key AITask
|
||||
```
|
||||
|
||||
## 预期输出
|
||||
|
||||
- 命令退出码为 `0`
|
||||
- 第一行包含 `term:AITask`
|
||||
- 事件列表至少包含一条 `created`
|
||||
|
||||
## 断言结论
|
||||
|
||||
- `events` 支持两种定位方式:`--id` 或 `--repo + --kind + --key`
|
||||
- 对调用方来说,repo-scoped natural key 足以定位单条 durable knowledge
|
||||
Reference in New Issue
Block a user