Files
ai-workflow-skill/docs/tests/inbox/show/show-mark-read-advances-read-cursor.md
T

712 B

case: show-mark-read-advances-read-cursor

用例意义

验证 show --mark-read 会推进调用 agent 的 read cursor,并影响后续 unread 查询。

前置条件

  • worker-e 有一个未读线程 THREAD_ID

输入

inbox --db TMPDIR/coord.db --agent worker-e --json show --thread THREAD_ID --mark-read
inbox --db TMPDIR/coord.db --json fetch --agent worker-e --status pending --unread

预期输出

  • show 成功
  • 随后的 fetch --unread 对该线程不再返回结果

断言结论

  • mark-read 的副作用是推进该 agent 的 last_read_message_id
  • 使用 --mark-read 时必须提供 agent 身份,可通过根级 --agent 或命令参数传入