Files
dacli/docs
sswandClaude c236615035 dacli(kb): 闭环测试 test-kb.ts (commit 3a/3)
7 步测试: 清理 → 新建域 → 新增条目 → 检索 → 过期 → search --all → renew → archive
验证自动特性: active_entries 自动过滤过期, search 自动更新 access_count。

实测输出 (npx tsx tests/test-kb.ts):
  1. 清理 test-kb-domain...                    ✓
  2. 新建 test-kb-domain (id=1)...              ✓
  3. 新增条目 (#1, #2)...                       ✓
  4. search "test" → 2 results (highlight OK)   ✓
  5. expire #1 → 1 result (active 过滤)         ✓
  6. search --all "test" → 2 results (含过期)   ✓
  7. renew #1 → 2 results (恢复)                ✓
  8. archive #2 → 1 result (archived 过滤)      ✓
  9. 清理 test-kb-domain...                     ✓

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
2026-07-02 16:09:53 +08:00
..