Add repo-memory CLI test docs
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
# Case: `ingest-imports-headingless-markdown-as-single-entry`
|
||||
|
||||
## 用例意义
|
||||
|
||||
验证 `ingest` 遇到没有任何 Markdown heading 的文档时,不会跳过,而是回退为单条导入 entry。
|
||||
|
||||
## 前置条件
|
||||
|
||||
- `TMPDIR/repo` 是一个已提交初始 commit 的 Git 仓库
|
||||
- `TMPDIR/repo/docs/ai/repo-memory.md` 存在,内容只有普通段落,没有任何 `#` heading,例如:
|
||||
|
||||
```md
|
||||
This repository keeps AI memory notes near docs/ai.
|
||||
Gateway owns ingress and app/app owns orchestration.
|
||||
```
|
||||
|
||||
- 空数据库已完成 `init`
|
||||
|
||||
## 输入
|
||||
|
||||
```bash
|
||||
repo-memory ingest --db TMPDIR/repo-memory.db --repo TMPDIR/repo
|
||||
repo-memory list --db TMPDIR/repo-memory.db --repo repo
|
||||
repo-memory search --db TMPDIR/repo-memory.db --repo repo --query "Gateway orchestration"
|
||||
```
|
||||
|
||||
## 预期输出
|
||||
|
||||
- `ingest` 退出码为 `0`
|
||||
- `ingest` 输出 `ingested 1 docs from ABS_REPO`
|
||||
- `list` 输出包含 `decision:repo-memory:overview [confirmed]`
|
||||
- `search` 输出包含 `decision:repo-memory:overview`
|
||||
|
||||
## 断言结论
|
||||
|
||||
- headingless markdown 不会被忽略
|
||||
- 该类文档会以回退 heading `Overview` 导入为单条 entry
|
||||
- 回退导入的 entry 仍然可以被 `list` 与 `search` 正常消费
|
||||
Reference in New Issue
Block a user