Files
ai-workflow-skill/docs/tests/repo-memory/link/link-rejects-when-entry-id-missing.md
T

27 lines
607 B
Markdown
Raw 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.
# Case: `link-rejects-when-entry-id-missing`
## 用例意义
验证 `link` 在缺少 `--from-id``--to-id` 时,会在写库前拒绝请求。
## 前置条件
- 空数据库已完成 `init`
- 已存在一条 entry`#1 term:AITask`
## 输入
```bash
repo-memory link --db TMPDIR/repo-memory.db --from-id 1 --relation related_to
```
## 预期输出
- 命令退出码为 `1`
- stderr 包含 `both entry ids are required`
## 断言结论
- `link` 需要完整的双端 entry id,不能只靠单端 id 建立半关系
- 缺失 id 的错误发生在写库前,不会生成不完整 link 记录